Search in sources :

Example 11 with FPSAnimator

use of com.jogamp.opengl.util.FPSAnimator 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

FPSAnimator (com.jogamp.opengl.util.FPSAnimator)11 GLWindow (com.jogamp.newt.opengl.GLWindow)8 GLCapabilities (com.jogamp.opengl.GLCapabilities)8 GLProfile (com.jogamp.opengl.GLProfile)8 Animator (com.jogamp.opengl.util.Animator)2 GLAnimatorControl (com.jogamp.opengl.GLAnimatorControl)1 GLAutoDrawable (com.jogamp.opengl.GLAutoDrawable)1