Search in sources :

Example 6 with GLCanvas

use of com.jogamp.opengl.awt.GLCanvas in project narchy by automenta.

the class CanvasOpenGLMaker method newGLCanvas.

/**
 * Constructs a canvas for 3D
 *
 * @return Canvas constructed
 */
public GLCanvas newGLCanvas() {
    if (this.capabilities != null) {
        return new GLCanvas(this.capabilities);
    }
    GLCapabilities capabilities = new GLCapabilities(GLProfile.getDefault());
    capabilities.setHardwareAccelerated(true);
    capabilities.setAlphaBits(8);
    capabilities.setNumSamples(1);
    // //capabilities.setDepthBits(32);
    return this.newGLCanvas(capabilities);
}
Also used : GLCanvas(com.jogamp.opengl.awt.GLCanvas) GLCapabilities(com.jogamp.opengl.GLCapabilities)

Aggregations

GLCanvas (com.jogamp.opengl.awt.GLCanvas)6 GLCapabilities (com.jogamp.opengl.GLCapabilities)3 Frame (java.awt.Frame)2 GLAutoDrawable (com.jogamp.opengl.GLAutoDrawable)1 GLProfile (com.jogamp.opengl.GLProfile)1 GLRunnable (com.jogamp.opengl.GLRunnable)1 Animator (com.jogamp.opengl.util.Animator)1 FPSAnimator (com.jogamp.opengl.util.FPSAnimator)1 WindowAdapter (java.awt.event.WindowAdapter)1 WindowEvent (java.awt.event.WindowEvent)1