当前位置: 首页>>代码示例>>Java>>正文


Java FPSAnimator.setUpdateFPSFrames方法代码示例

本文整理汇总了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();
}
 
开发者ID:andreasdr,项目名称:tdme,代码行数:33,代码来源:EngineTest.java

示例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();
}
 
开发者ID:andreasdr,项目名称:tdme,代码行数:33,代码来源:PhysicsTest1.java

示例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();
}
 
开发者ID:andreasdr,项目名称:tdme,代码行数:34,代码来源:PhysicsTest2.java

示例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();
}
 
开发者ID:andreasdr,项目名称:tdme,代码行数:36,代码来源:GUITest.java

示例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();
}
 
开发者ID:andreasdr,项目名称:tdme,代码行数:34,代码来源:PhysicsTest3.java

示例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();
}
 
开发者ID:ClearVolume,项目名称:ClearGL,代码行数:10,代码来源:ClearGLWindow.java


注:本文中的com.jogamp.opengl.util.FPSAnimator.setUpdateFPSFrames方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。