本文整理汇总了Java中com.jogamp.opengl.util.FPSAnimator.setUpdateFPSFrames方法的典型用法代码示例。如果您正苦于以下问题:Java FPSAnimator.setUpdateFPSFrames方法的具体用法?Java FPSAnimator.setUpdateFPSFrames怎么用?Java FPSAnimator.setUpdateFPSFrames使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jogamp.opengl.util.FPSAnimator
的用法示例。
在下文中一共展示了FPSAnimator.setUpdateFPSFrames方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import com.jogamp.opengl.util.FPSAnimator; //导入方法依赖的package包/类
/**
* @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("EngineTest");
// animator
FPSAnimator animator = new FPSAnimator(glWindow, 60);
// tdme level editor
EngineTest engineTest = new EngineTest(glWindow, animator);
// GL Window
glWindow.addGLEventListener(engineTest);
glWindow.setSize(800, 600);
glWindow.setVisible(true);
glWindow.addKeyListener(engineTest);
glWindow.addMouseListener(engineTest);
glWindow.addWindowListener(engineTest);
// start animator
animator.setUpdateFPSFrames(3, null);
animator.start();
}
示例2: main
import com.jogamp.opengl.util.FPSAnimator; //导入方法依赖的package包/类
/**
* @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("PhysicsTest1");
// animator
FPSAnimator animator = new FPSAnimator(glWindow, 60);
// tdme level editor
PhysicsTest1 physicsTest1 = new PhysicsTest1();
// GL Window
glWindow.addGLEventListener(physicsTest1);
glWindow.setSize(800, 600);
glWindow.setVisible(true);
glWindow.addKeyListener(physicsTest1);
glWindow.addMouseListener(physicsTest1);
glWindow.addWindowListener(physicsTest1);
// start animator
animator.setUpdateFPSFrames(3, null);
animator.start();
}
示例3: main
import com.jogamp.opengl.util.FPSAnimator; //导入方法依赖的package包/类
/**
* 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("PhysicsTest2");
// animator
FPSAnimator animator = new FPSAnimator(glWindow, 60);
// tdme level editor
PhysicsTest2 physicsTest2 = new PhysicsTest2();
// GL Window
glWindow.addGLEventListener(physicsTest2);
glWindow.setSize(800, 600);
glWindow.setVisible(true);
glWindow.addKeyListener(physicsTest2);
glWindow.addMouseListener(physicsTest2);
glWindow.addWindowListener(physicsTest2);
// start animator
animator.setUpdateFPSFrames(3, null);
animator.start();
}
示例4: main
import com.jogamp.opengl.util.FPSAnimator; //导入方法依赖的package包/类
/**
* @param args
*/
public static void main(String[] args) {
Logger.getLogger("").setLevel(Level.WARNING);
// gl profile
GLProfile glp = Engine.getProfile();
// create GL caps
GLCapabilities caps = new GLCapabilities(glp);
caps.setBackgroundOpaque(true);
caps.setDepthBits(16);
caps.setDoubleBuffered(true);
Console.println(glp);
Console.println(caps);
// create GL window
GLWindow glWindow = GLWindow.create(caps);
glWindow.setTitle("GUI Test");
glWindow.setSize(800, 600);
// animator
FPSAnimator animator = new FPSAnimator(glWindow, 60);
animator.setUpdateFPSFrames(3, null);
// create test
GUITest guiTest = new GUITest(glWindow);
glWindow.addGLEventListener(guiTest);
glWindow.addWindowListener(guiTest);
glWindow.setVisible(true);
// start animator
animator.start();
}
示例5: main
import com.jogamp.opengl.util.FPSAnimator; //导入方法依赖的package包/类
/**
* 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();
}
示例6: start
import com.jogamp.opengl.util.FPSAnimator; //导入方法依赖的package包/类
public void start() {
mAnimator = new FPSAnimator(this.getGLAutoDrawable(),
mFramesPerSecond);
mAnimator.setUpdateFPSFrames(60, null);
mAnimator.start();
while (!mAnimator.isAnimating())
Thread.yield();
}