List of usage examples for org.eclipse.swt.opengl GL glEnable
public static native void glEnable(int cap);
From source file:org.eclipse.swt.snippets.Snippet174.java
static void init(GLCanvas canvas) { canvas.setCurrent();//from w w w. j a v a2 s .c o m resize(canvas); GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f); GL.glColor3f(0.0f, 0.0f, 0.0f); GL.glClearDepth(1.0f); GL.glEnable(GL.GL_DEPTH_TEST); GL.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST); }
From source file:org.eclipse.swt.snippets.Snippet174.java
static GLContext init(Canvas canvas) { GLContext context = new GLContext(canvas); context.setCurrent();/*w ww. ja v a2s. com*/ resize(canvas); GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f); GL.glColor3f(0.0f, 0.0f, 0.0f); GL.glClearDepth(1.0f); GL.glEnable(GL.GL_DEPTH_TEST); GL.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST); return context; }