本文整理匯總了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();
}