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


Java AppSettings.setFullscreen方法代碼示例

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


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

示例1: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) throws InterruptedException{
    AppSettings settings = new AppSettings(true);

    final Application app = new Application();
    app.setSettings(settings);
    app.start();

    Thread.sleep(3000);

    settings.setFullscreen(true);
    settings.setResolution(-1, -1);
    app.setSettings(settings);
    app.restart();

    Thread.sleep(3000);

    app.stop();
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:19,代碼來源:TestContextRestart.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: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
/**
 * @param args
 */
public static void main(String[] args) {
	JOryx oryx = new JOryx();
	singleton = oryx;
	AppSettings a = new AppSettings(true);
	SettingsState ss = SettingsState.getSingleton();
	ss.loadSettings();
	a.setTitle("Realm of the Mad God");
	a.setWidth(ss.width);
	a.setHeight(ss.height);
	a.setFullscreen(ss.fullscreen);
	a.setRenderer(AppSettings.LWJGL_OPENGL1);
	oryx.setSettings(a);
	oryx.setPauseOnLostFocus(false);
	oryx.start();
}
 
開發者ID:AMPBEdu,項目名稱:gjOryx,代碼行數:19,代碼來源:JOryx.java

示例4: makeJmeApplication

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
protected SupernoveaApplication makeJmeApplication(int framerate) {
	AppSettings settings = new AppSettings(true);

	// important to use those settings
	//		settings.putBoolean("GraphicsDebug", true);
	settings.setFullscreen(false);
	settings.setUseInput(false);
	settings.setFrameRate(Math.max(1, Math.min(60, framerate)));
	settings.setCustomRenderer(com.jme3x.jfx.injfx.JmeContextOffscreenSurface.class);

	SupernoveaApplication app = new SupernoveaApplication();
	app.setSettings(settings);
	app.setShowSettings(false);
	return app;
}
 
開發者ID:meltzow,項目名稱:supernovae,代碼行數:16,代碼來源:JmeImageView.java

示例5: 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

示例6: apply

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
void apply(SimpleApplication app) {
		try {
			app.setDisplayFps(showFps.isSelected());
			app.setDisplayStatView(showStats.isSelected());
			app.setShowSettings(true);
	    	AppSettings settingsEdit = new AppSettings(false);
	    	settingsEdit.copyFrom(app.getContext().getSettings());
	    	settingsEdit.setFullscreen(fullscreen.isSelected());
	    	settingsEdit.setVSync(vsync.isSelected());
	    	DisplayMode mode = resolution.getValue();
	    	settingsEdit.setResolution(mode.getWidth(), mode.getHeight());
	    	settingsEdit.setDepthBits(mode.getBitDepth());
	    	settingsEdit.setFrequency(!vsync.isSelected() ? 0 : (mode.getRefreshRate() != DisplayMode.REFRESH_RATE_UNKNOWN)? mode.getRefreshRate() : 60);
	    	settingsEdit.setSamples(antialiasing.getValue());
	    	app.setSettings(settingsEdit);
	    	settingsEdit.save(settingsEdit.getTitle());
	    	app.restart();
//	    	((Main)app).onNextReshape = new Function<Main,Boolean>(){
//				@Override
//				public Boolean apply(Main input) {
//		    		Widgets.fullCamera(hudPanel, input.getCamera());
//		    		return true;
//				}
//
//	    	};
		} catch(Exception exc) {
			throw new RuntimeException(exc);
		}
    }
 
開發者ID:davidB,項目名稱:jme3_skel,代碼行數:30,代碼來源:HudSettings.java

示例7: init

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static RenderProcessor init(INodeManager manager, IRenderPreparator preparator) {
    java.util.logging.Logger.getLogger("").setLevel(Level.WARNING);
    RenderProcessor app = new RenderProcessor();
    AppSettings settings = new AppSettings(true);
    settings.setResolution(800, 600);
    settings.setSamples(2);
    settings.setFullscreen(false);
    app.setSettings(settings);
    app.setShowSettings(false);
    app.initNodeManager(manager);
    app.initPreparator(preparator);
    app.initSecurityLock();
    app.start();
    return app;
}
 
開發者ID:mosstest,項目名稱:mosstest,代碼行數:16,代碼來源:RenderProcessor.java

示例8: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args)
{
    app = new Main();

    app.setShowSettings(true);
    app.setDisplayStatView(true);

    AppSettings settings = new AppSettings(true);
    settings.setResolution(1280, 720);
    settings.setFullscreen(false);
    // settings.setVSync(true);
    // settings.setFrameRate(300);
    app.setSettings(settings);
    app.start();
}
 
開發者ID:jayfella,項目名稱:TerrainWorld,代碼行數:16,代碼來源:Main.java

示例9: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args)
{
    AppSettings screenSettings = new AppSettings(true);
    screenSettings.setTitle("Cave Dwellers");
    screenSettings.setResolution(1280, 600);
    screenSettings.setFullscreen(false);

    CaveDwellers app = new CaveDwellers();
    app.setSettings(screenSettings);
    app.setShowSettings(false);
    app.setPauseOnLostFocus(true);
    app.start(); // calls simpleInitApp()
}
 
開發者ID:abnercoimbre,項目名稱:tower-defense-cave,代碼行數:14,代碼來源:CaveDwellers.java

示例10: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) throws InterruptedException{
    System.out.println("Creating application..");
    Application app = new Application();
    System.out.println("Starting application in LWJGL mode..");
    app.start();
    System.out.println("Waiting 5 seconds");
    Thread.sleep(5000);
    System.out.println("Closing application..");
    app.stop();

    Thread.sleep(2000);
    System.out.println("Starting in fullscreen mode");
    app = new Application();
    AppSettings settings = new AppSettings(true);
    settings.setFullscreen(true);
    settings.setResolution(-1,-1); // current width/height
    app.setSettings(settings);
    app.start();
    Thread.sleep(5000);
    app.stop();

    Thread.sleep(2000);
    System.out.println("Creating offscreen buffer application");
    app = new Application();
    app.start(Type.OffscreenSurface);
    Thread.sleep(3000);
    System.out.println("Destroying offscreen buffer");
    app.stop();
}
 
開發者ID:chototsu,項目名稱:MikuMikuStudio,代碼行數:30,代碼來源:TestApplication.java

示例11: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
    TestBatchNodeCluster app = new TestBatchNodeCluster();
    settingst = new AppSettings(true);
    //settingst.setFrameRate(75);
    settingst.setResolution(640, 480);
    settingst.setVSync(false);
    settingst.setFullscreen(false);
    app.setSettings(settingst);
    app.setShowSettings(false);
    app.start();
}
 
開發者ID:chototsu,項目名稱:MikuMikuStudio,代碼行數:12,代碼來源:TestBatchNodeCluster.java

示例12: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
    TestCubeCluster app = new TestCubeCluster();
    settingst = new AppSettings(true);
    //settingst.setFrameRate(75);
    settingst.setResolution(640, 480);
    settingst.setVSync(false);
    settingst.setFullscreen(false);
    app.setSettings(settingst);
    app.setShowSettings(false);
    app.start();
}
 
開發者ID:chototsu,項目名稱:MikuMikuStudio,代碼行數:12,代碼來源:TestCubeCluster.java

示例13: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static final void main(String[] args) {
	Thread.setDefaultUncaughtExceptionHandler(Main::handleException);
	
	Arguments arguments = new Arguments();
	arguments.addString("game", "../../quadraxample/");
	arguments.addString("mode", "single");
	arguments.addString("path", ".");
	arguments.addString("server-address", "localhost");
	arguments.addInteger("server-tcp-port", 7907);
	arguments.addInteger("server-udp-port", 7908);
	
	arguments.process(args);
	
	Game game = new Game(Paths.get(arguments.getString("game")));
	
	Interlayer interlayer = null;
	
	LoggerFactory.setLogLevel(LogLevel.TRACE);
	
	if (arguments.getString("mode").equals("single")) {
		ServerEnvironment serverEnvironment = new ServerEnvironment(game);
		interlayer = new CloningInterlayer(serverEnvironment);
	} else if (arguments.getString("mode").equals("multi")) {
		interlayer = new KryonetClient(
				arguments.getString("server-address"),
				arguments.getInteger("server-tcp-port"),
				arguments.getInteger("server-udp-port"));
	}
	
	AppSettings appSettings = new AppSettings(true);
	appSettings.setFullscreen(false);
	appSettings.setHeight(600);
	appSettings.setResizable(true);
	appSettings.setTitle("Quadracoatl");
	appSettings.setVSync(false);
	appSettings.setWidth(800);
	
	QuadracoatlApplication application = new QuadracoatlApplication(arguments.getString("path"), interlayer);
	application.setSettings(appSettings);
	application.start(true);
}
 
開發者ID:quadracoatl,項目名稱:quadracoatl,代碼行數:42,代碼來源:Main.java

示例14: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
		Logger.getLogger("").setLevel(Level.WARNING);

		AppSettings settings = new AppSettings(true);
		settings.setResolution(1280, 720);
		settings.setVSync(true);
		settings.setFullscreen(false);

		SimpleApplication app = new SimpleApplication(){
			@Override
			public void simpleInitApp() {
			}
		};

		app.setSettings(settings);
		app.setShowSettings(false);
		app.setDisplayStatView(true);
		app.setDisplayFps(true);
		// !!!! without .setPauseOnLostFocus(false)you should switch focus from javafx window to jme to see update
		app.setPauseOnLostFocus(false);
		app.start();

		//Setup Camera
		app.enqueue(() -> {
			app.getFlyByCamera().setEnabled(true);
			app.getFlyByCamera().setDragToRotate(true);
			//app.getStateManager().detach(app.getStateManager().getState(FlyCamAppState.class));
			app.getInputManager().setCursorVisible(true);
			return null;
		});
		//Setup a default scene (grid + axis)
		app.enqueue(() -> {
			app.getRootNode().attachChild(Helper.makeScene(app));
			app.getRootNode().attachChild(sampleCube(app));
			app.getRootNode().attachChild(sampleShapes(app));
			return null;
		});
		//Setup SpatialExplorer
		Helper.setupSpatialExplorerWithAll(app);
//		app.enqueue(() -> {
//			AppStateSpatialExplorer se = new AppStateSpatialExplorer();
//			Helper.registerAction_Refresh(se.spatialExplorer);
//			Helper.registerAction_ShowLocalAxis(se.spatialExplorer, app);
//			Helper.registerAction_SaveAsJ3O(se.spatialExplorer, app);
//			Helper.registerAction_ShowSkeleton(se.spatialExplorer, app);
//			Helper.registerAction_ShowWireframe(se.spatialExplorer, app);
//			Helper.registerBarAction_ShowFps(se.spatialExplorer, app);
//			Helper.registerBarAction_ShowStats(se.spatialExplorer, app);
//			Helper.registerBarAction_SceneInWireframe(se.spatialExplorer, app);
//			Helper.registerBarAction_SceneInDebugPhysic(se.spatialExplorer, app);
//			app.getStateManager().attach(se);
//			return null;
//		});
		app.enqueue(() -> {
			AppStateSpatialExplorer se = app.getStateManager().getState(AppStateSpatialExplorer.class);
			registerBarAction_PrintToto(se.spatialExplorer);
			return null;
		});
	}
 
開發者ID:davidB,項目名稱:jme3_ext_spatial_explorer,代碼行數:60,代碼來源:Demo.java

示例15: ModelViewer

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public ModelViewer(Options options) {
		this.options = options;

		AppSettings settings = new AppSettings(true);
		settings.setResolution(options.width, options.height);
		settings.setVSync(true);
		settings.setFullscreen(options.fullscreen);

//		try {
//			ClassLoader cl = Thread.currentThread().getContextClassLoader();
//			settings.setIcons(new BufferedImage[]{
//				ImageIO.read(cl.getResourceAsStream("shortcut-128.png")),
//				ImageIO.read(cl.getResourceAsStream("shortcut-64.png")),
//				ImageIO.read(cl.getResourceAsStream("shortcut-32.png")),
//				ImageIO.read(cl.getResourceAsStream("shortcut-16.png"))
//			});
//		} catch (Exception e) {
//			//log.log(java.util.logging.Level.WARNING, "Unable to load program icons", e);
//			e.printStackTrace();
//		}

		if (options.assetCfg != null) {
			settings.putString("AssetConfigURL", options.assetCfg.toExternalForm());
		}

		app = new SimpleApplication(){
			CountDownLatch running = new CountDownLatch(1);

			@Override public void simpleInitApp() {
			}

			@Override public void destroy() {
				super.destroy();
				running.countDown();
			}
		};

		app.setSettings(settings);
		app.setShowSettings(options.showJmeSettings);
		app.setDisplayStatView(true);
		app.setDisplayFps(true);
		// !!!! without .setPauseOnLostFocus(false) server will only send screenshot to blender,... when jme main screen have focus
		app.setPauseOnLostFocus(false);
	}
 
開發者ID:xbuf,項目名稱:jme3_xbuf,代碼行數:45,代碼來源:ModelViewer.java


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