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

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

Introduction

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

Prototype

public static native void glHint(int target, int mode);

Source Link

Usage

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

static void init(GLCanvas canvas) {
    canvas.setCurrent();// w w  w.  java2 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();//from   ww  w.j av  a2  s. 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;
}