Search in sources :

Example 1 with GLData

use of org.lwjgl.opengl.awt.GLData in project Terasology by MovingBlocks.

the class LwjglPortlet method createCanvas.

public void createCanvas() {
    GLData data = new GLData();
    data.samples = 4;
    canvas = new AWTGLCanvas() {

        @Override
        public void initGL() {
            initGLFW();
            initOpenGL();
            glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
            glLoadIdentity();
        }

        @Override
        public void paintGL() {
            if (((TerasologyEngine) engine).tick()) {
                mouseDevice.resetDelta();
            }
        }
    };
}
Also used : GLData(org.lwjgl.opengl.awt.GLData) AWTGLCanvas(org.lwjgl.opengl.awt.AWTGLCanvas)

Aggregations

AWTGLCanvas (org.lwjgl.opengl.awt.AWTGLCanvas)1 GLData (org.lwjgl.opengl.awt.GLData)1