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


Java AppSettings.setResolution方法代碼示例

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


在下文中一共展示了AppSettings.setResolution方法的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: 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

示例3: visualize

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public void visualize() throws InterruptedException {
  if (jmeApp != null) {
    log.info("JmeApp already started");
    return;
  }
  jmeApp = new TestJmeIMModel();
  //jmeApp.setObjects(getCollisionObject());
  //jmeApp.setShowSettings(false);
  AppSettings settings = new AppSettings(true);
  settings.setResolution(800,600);
  //settings.setUseInput(false);
  jmeApp.setSettings(settings);
  jmeApp.setShowSettings(false);
  jmeApp.setPauseOnLostFocus(false);
  jmeApp.setService(this);
  jmeApp.start();
  //need to wait for jmeApp to be ready or the models won't load
  synchronized (this) {
    wait(5000);
  }
  //add the existing objects
  jmeApp.addObject(collisionItems.getItems());
}
 
開發者ID:MyRobotLab,項目名稱:myrobotlab,代碼行數:24,代碼來源:IntegratedMovement.java

示例4: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args){
    TestRenderToMemory app = new TestRenderToMemory();
    app.setPauseOnLostFocus(false);
    AppSettings settings = new AppSettings(true);
    settings.setResolution(1, 1);
    app.setSettings(settings);
    app.start(Type.OffscreenSurface);
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:9,代碼來源:TestRenderToMemory.java

示例5: start

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
@Override
public void start(JmeContext.Type contextType){
    AppSettings settings = new AppSettings(true);
    settings.setResolution(1024, 768);
    setSettings(settings);
    
    super.start(contextType);
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:9,代碼來源:TestAppStates.java

示例6: appReshape

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
@Override
public void appReshape(int width, int height) {
    logger.log(Level.FINE, "JmeAppHarness reshape");
    AppSettings settings = app.getContext().getSettings();
    settings.setResolution(width, height);
    if (renderer != null) {
		app.reshape(width, height);
	}
	if (input != null) {
		input.loadSettings(settings);
	}
}
 
開發者ID:jMonkeyEngine,項目名稱:sdk,代碼行數:13,代碼來源:JmeAppHarness.java

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

示例8: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
    AppSettings settings = new AppSettings(true);
    settings.setResolution(640, 480);
    settings.setSamples(4);
    settings.setTitle("Projection");
    settings.setFrameRate(40);
    
    ProjectTest app = new ProjectTest();
    app.setSettings(settings);
    app.setShowSettings(false);
    app.setPauseOnLostFocus(false);
    app.start();
    
}
 
開發者ID:huliqing,項目名稱:LuoYing,代碼行數:15,代碼來源:ProjectTest.java

示例9: create

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
/**
 * 創建遊戲,默認幀率60.
 * @param appClass
 * @param width
 * @param height
 */
public static void create(String appClass, int width, int height) {
    AppSettings settings = new AppSettings(true);
    settings.setResolution(width, height);
    settings.setFrameRate(60);
    create(appClass, settings, new VBox());
}
 
開發者ID:huliqing,項目名稱:LuoYing,代碼行數:13,代碼來源:Jfx.java

示例10: start

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
private void start() {
    AppSettings settings = new AppSettings(true);
    settings.setResolution(1280, 720);
    settings.setFrameRate(90);
    settings.setSamples(4);
    
    Jfx.create(Editor.class.getName(), settings);
    Jfx.getMainFrame().setLocationRelativeTo(null);
    Jfx.getMainFrame().setVisible(true);
    Jfx.getMainFrame().setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    Jfx.getMainFrame().setIconImages(createIcons());
    Jfx.getMainFrame().addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent e) {
            super.windowClosing(e);
            Quit.doQuit(); // 由Quicker負責退出
        }
    });
    
    // 開始構建JFX界麵
    // 這裏要等待JmeApp執行完simpleInit方法之後再開始執行Jfx UI,因為UI要依賴於JME的初始化
    Jfx.runOnJme(() -> {
        Jfx.runOnJfx(() -> {
            UIManager.initializeLayout(Jfx.getJfxRoot());
        });
    });
    
}
 
開發者ID:huliqing,項目名稱:LuoYing,代碼行數:29,代碼來源:Starter.java

示例11: start

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
@Override
    public void start(Stage stage) throws Exception {
        
        AppSettings settings = new AppSettings(true);
        // 這裏必須把初始化時的分辨率調高一些,最好剛好或大於整個屏幕,因為一些jmeContext(如LwjglOffscreenBuffer)會
        // 使用分辨率來初始化Pbuffer,但是Pbuffer在運行過程無法重建,即大小無法調整,這會導致如果一開始太小則當窗口調整
        // 時,渲染窗口生成的圖片無法覆蓋整個窗口。
        settings.setResolution(width, height);
        settings.setFrameRate(30);
        
        // setKeepResolution保持分辨率不要太大,以節省性能。
        jfxView = JfxSystem.startApp(TestEditor.class.getName(), settings);
        jfxView.setResolutionLimit(width, height);
        jfxView.setUseDepthBuffer(true);
        
//        Button btn = new Button();
//        btn.setText("Stop JFX Application");
//        btn.setOnAction(e -> {
//            Platform.exit();
//        });        
        
        StackPane root = new StackPane();
        root.setBackground(Background.EMPTY);
        root.getChildren().add(jfxView);
//        root.getChildren().add(btn);
        
        Scene scene = new Scene(root);
        scene.setFill(new Color(0f, 0f, 0f, 0f));
        
        jfxView.fitWidthProperty().bind(scene.widthProperty());
        jfxView.fitHeightProperty().bind(scene.heightProperty());
        jfxView.setEffect(new DropShadow());
        
        stage.setTitle("Hello World!");
        stage.setScene(scene);
        stage.initStyle(StageStyle.TRANSPARENT);
        stage.show();
    }
 
開發者ID:huliqing,項目名稱:LuoYing,代碼行數:39,代碼來源:TestJfx.java

示例12: main

import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
    
    AppSettings settings = new AppSettings(true);
    settings.setResolution(1024, 768);
    settings.setFrameRate(60);
    
    Editor app = new Editor();
    app.setSettings(settings);
    app.setShowSettings(false);
    app.start();
    
}
 
開發者ID:huliqing,項目名稱:LuoYing,代碼行數:13,代碼來源:TestEditor.java

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

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

示例15: main

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

        AppSettings settings = new AppSettings(true);
        settings.setTitle("Circle");
        settings.setResolution(800, 600);
        Circle2dTest app = new Circle2dTest();
        app.setSettings(settings);
        app.setPauseOnLostFocus(false);
        app.setShowSettings(false);

        app.start();
    }
 
開發者ID:mifth,項目名稱:JME-Simple-Examples,代碼行數:13,代碼來源:Circle2dTest.java


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