Search in sources :

Example 11 with GLProfile

use of com.jogamp.opengl.GLProfile in project tdme by andreasdr.

the class PhysicsTest3 method main.

/**
	 * Main
	 * @param args
	 */
public static void main(String[] args) {
    Logger.getLogger("").setLevel(Level.WARNING);
    // create GL canvas
    GLProfile glp = Engine.getProfile();
    GLCapabilities caps = new GLCapabilities(glp);
    // create GL window
    GLWindow glWindow = GLWindow.create(caps);
    glWindow.setTitle("PhysicsTest3");
    // animator
    FPSAnimator animator = new FPSAnimator(glWindow, 60);
    // tdme level editor
    PhysicsTest3 physicsTest3 = new PhysicsTest3();
    // GL Window
    glWindow.addGLEventListener(physicsTest3);
    glWindow.setSize(800, 600);
    glWindow.setVisible(true);
    glWindow.addKeyListener(physicsTest3);
    glWindow.addMouseListener(physicsTest3);
    glWindow.addWindowListener(physicsTest3);
    // start animator
    animator.setUpdateFPSFrames(3, null);
    animator.start();
}
Also used : FPSAnimator(com.jogamp.opengl.util.FPSAnimator) GLCapabilities(com.jogamp.opengl.GLCapabilities) GLWindow(com.jogamp.newt.opengl.GLWindow) GLProfile(com.jogamp.opengl.GLProfile)

Aggregations

GLProfile (com.jogamp.opengl.GLProfile)11 GLCapabilities (com.jogamp.opengl.GLCapabilities)10 GLWindow (com.jogamp.newt.opengl.GLWindow)8 FPSAnimator (com.jogamp.opengl.util.FPSAnimator)8 Point (java.awt.Point)1