當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。