Example usage for org.eclipse.swt.opengl GL GL_QUADS

List of usage examples for org.eclipse.swt.opengl GL GL_QUADS

Introduction

In this page you can find the example usage for org.eclipse.swt.opengl GL GL_QUADS.

Prototype

int GL_QUADS

To view the source code for org.eclipse.swt.opengl GL GL_QUADS.

Click Source Link

Usage

From source file:org.eclipse.swt.snippets.Snippet174.java

static void render() {
    GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
    GL.glLoadIdentity();/* w w  w  .  ja  v  a 2 s .com*/
    GL.glTranslatef(0.0f, 0.0f, -6.0f);
    GL.glBegin(GL.GL_QUADS);
    GL.glVertex3f(-1.0f, 1.0f, 0.0f);
    GL.glVertex3f(1.0f, 1.0f, 0.0f);
    GL.glVertex3f(1.0f, -1.0f, 0.0f);
    GL.glVertex3f(-1.0f, -1.0f, 0.0f);
    GL.glEnd();
}