當前位置: 首頁>>代碼示例>>Java>>正文


Java AppSettings.setVSync方法代碼示例

本文整理匯總了Java中com.jme3.system.AppSettings.setVSync方法的典型用法代碼示例。如果您正苦於以下問題:Java AppSettings.setVSync方法的具體用法?Java AppSettings.setVSync怎麽用?Java AppSettings.setVSync使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.jme3.system.AppSettings的用法示例。


在下文中一共展示了AppSettings.setVSync方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: init

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public void init(SurveyPlayback sim) {

		mSettings = new AppSettings(true);

		mSettings.setTitle("HELIOS - The Heidelberg LiDAR Operations Simulator");
		mSettings.setVSync(true);
		mSettings.setResolution(1680, 1050);
		mSettings.setResolution(1280, 1024);
		mSettings.setResolution(1600, 1024);
		// setting.setResolution(1024,768);
		mSettings.setResolution(1024,768);

		mSettings.setSamples(4);

		setSettings(mSettings);

		setShowSettings(false);

		// ATTENTION: This is REQUIRED to prevent freezing of the whole computer if the program loses focus!
		// setPauseOnLostFocus() must be "false" since currently, setting it to "true" won't stop the actual simulation anyway.
		setPauseOnLostFocus(false);
		this.sim = sim;
	}
 
開發者ID:GIScience,項目名稱:helios,代碼行數:24,代碼來源:JMEFrontEnd.java

示例2: start

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
@Override
public void start()
{
	DisplayPrefsItem dprefs = new DisplayPrefsItem();
	AppSettings settings = new AppSettings(true);
	settings.setTitle("Multiplicity v3.0");
	settings.setBitsPerPixel(dprefs.getBitsPerPixel());
	settings.setWidth(dprefs.getWidth());
	settings.setHeight(dprefs.getHeight());
	settings.setFullscreen(dprefs.getFullScreen());
	settings.setVSync(true);
	settings.setSamples(dprefs.getMinimumAntiAliasSamples());
	setSettings(settings);

	super.start();
}
 
開發者ID:synergynet,項目名稱:synergynet3.1,代碼行數:17,代碼來源:JMEAppRoot.java

示例3: getPanel

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
private Container getPanel() {
   	Dimension d3Dim = new Dimension (800, 600);
	
	AppSettings settings = new AppSettings(true);
	
	settings.setWidth(d3Dim.width);
	settings.setHeight(d3Dim.height);
	settings.setSamples(4);
	settings.setVSync(true);
	settings.setFrameRate(60);
	
	setSettings(settings);
	createCanvas();
	JmeCanvasContext ctx = (JmeCanvasContext) getContext();
	ctx.setSystemListener(this);
	
	Canvas canvas = ctx.getCanvas();
	canvas.setPreferredSize(d3Dim);
	
	JPanel panel = new JPanel(new BorderLayout());
	panel.add( canvas, BorderLayout.CENTER );
	
	return panel;
}
 
開發者ID:twak,項目名稱:siteplan,代碼行數:25,代碼來源:Preview.java

示例4: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
	AppSettings settings = new AppSettings(true);
	settings.setOpenCLSupport(true);
	settings.setOpenCLPlatformChooser(UserPlatformChooser.class);
	settings.setVSync(true);
	TestFluids2D_old app = new TestFluids2D_old();
	app.setSettings(settings);
	app.setShowSettings(true);
	app.start();
}
 
開發者ID:shamanDevel,項目名稱:jME3-OpenCL-Library,代碼行數:14,代碼來源:TestFluids2D_old.java

示例5: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
	AppSettings settings = new AppSettings(true);
	settings.setOpenCLSupport(true);
	settings.setOpenCLPlatformChooser(UserPlatformChooser.class);
	settings.setVSync(false);
	settings.setResolution(1024, 768);
	TestFluids2D app = new TestFluids2D();
	app.setSettings(settings);
	app.setShowSettings(true);
	app.start();
}
 
開發者ID:shamanDevel,項目名稱:jME3-OpenCL-Library,代碼行數:12,代碼來源:TestFluids2D.java

示例6: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
/**
	 * @param args the command line arguments
	 */
	public static void main(String[] args) {
		AppSettings settings = new AppSettings(true);
		settings.setOpenCLSupport(true);
		settings.setOpenCLPlatformChooser(UserPlatformChooser.class);
		settings.setVSync(true);
//		settings.setRenderer("JOGL");
		TestParticles app = new TestParticles();
		app.setSettings(settings);
		app.setShowSettings(true);
		app.start();
	}
 
開發者ID:shamanDevel,項目名稱:jME3-OpenCL-Library,代碼行數:15,代碼來源:TestParticles.java

示例7: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
	GrassTest app = new GrassTest();
	app.getStateManager().detach(app.getStateManager().getState(FlyCamAppState.class));
	AppSettings settings = new AppSettings(true);
	settings.setUseJoysticks(true);
	settings.setResolution(1280, 800);
	settings.setVSync(true);
	app.setSettings(settings);
	app.setShowSettings(true);
	app.start();
}
 
開發者ID:shamanDevel,項目名稱:ProceduralTerrain,代碼行數:12,代碼來源:GrassTest.java

示例8: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
    SimpleChaseCameraTest app = new SimpleChaseCameraTest();
    AppSettings aps = new AppSettings(true);
    aps.setVSync(true);
    aps.setResolution(800, 600);
    app.setSettings(aps);
    app.start();
}
 
開發者ID:mifth,項目名稱:JME-Simple-Examples,代碼行數:9,代碼來源:SimpleChaseCameraTest.java

示例9: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
    SpatialMotionsSmooth1 app = new SpatialMotionsSmooth1();
    
    //set vSinc on to get stable 60 fps
    AppSettings aps = new AppSettings(true);
    aps.setVSync(true);
    app.setSettings(aps);
    app.start();
}
 
開發者ID:mifth,項目名稱:JME-Simple-Examples,代碼行數:10,代碼來源:SpatialMotionsSmooth1.java

示例10: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
    SpatialMotionsNonLinear app = new SpatialMotionsNonLinear();
    
    //set vSinc on to get stable 60 fps
    AppSettings aps = new AppSettings(true);
    aps.setVSync(true);
    app.setSettings(aps);
    app.start();
}
 
開發者ID:mifth,項目名稱:JME-Simple-Examples,代碼行數:10,代碼來源:SpatialMotionsNonLinear.java

示例11: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
    SpatialMotionsSmooth2 app = new SpatialMotionsSmooth2();
    
    //set vSinc on to get stable 60 fps
    AppSettings aps = new AppSettings(true);
    aps.setVSync(true);
    app.setSettings(aps);
    app.start();
}
 
開發者ID:mifth,項目名稱:JME-Simple-Examples,代碼行數:10,代碼來源:SpatialMotionsSmooth2.java

示例12: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
    SpatialMotionsLinear app = new SpatialMotionsLinear();
    
    //set vSinc on to get stable 60 fps
    AppSettings aps = new AppSettings(true);
    aps.setVSync(true);
    app.setSettings(aps);
    app.start();
    
}
 
開發者ID:mifth,項目名稱:JME-Simple-Examples,代碼行數:11,代碼來源:SpatialMotionsLinear.java

示例13: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
    ShootBulletRun app = new ShootBulletRun();
    
    //set vSinc on to get stable 60 fps
    AppSettings aps = new AppSettings(true);
    aps.setVSync(true);
    app.setSettings(aps);
    app.start();
}
 
開發者ID:mifth,項目名稱:JME-Simple-Examples,代碼行數:10,代碼來源:ShootBulletRun.java

示例14: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
        SpaceShip app = new SpaceShip();
        AppSettings aps = new AppSettings(true);
        aps.setVSync(true);
//        aps.setFrameRate(60);
//        aps.setResolution(800, 600);
        app.setSettings(aps);
        app.start();
    }
 
開發者ID:mifth,項目名稱:JME-Simple-Examples,代碼行數:10,代碼來源:SpaceShip.java

示例15: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
/**
 * Main class used to run the animation preview from command line.
 * @param args the command line arguments
 * @throws Exception if exception occurs during execution
 */
public static void main(String[] args) throws Exception {
    AnimationPreview app = new AnimationPreview();
    final AppSettings appSettings = new AppSettings(true);
    appSettings.setFullscreen(false);
    appSettings.setResolution(640, 480);
    appSettings.setSamples(8);
    appSettings.setVSync(false);
    app.setSettings(appSettings);
    app.setShowSettings(false);
    app.start();
}
 
開發者ID:bubblecloud,項目名稱:jme3-open-asset-pack,代碼行數:17,代碼來源:AnimationPreview.java


注:本文中的com.jme3.system.AppSettings.setVSync方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。