Java Code Examples for com.jme3.system.AppSettings#setFullscreen()

The following examples show how to use com.jme3.system.AppSettings#setFullscreen() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestContextRestart.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public static void main(String[] args) throws InterruptedException{
    AppSettings settings = new AppSettings(true);

    final LegacyApplication app = new LegacyApplication();
    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();
}
 
Example 2
Source File: TestContextRestart.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 6 votes vote down vote up
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();
}
 
Example 3
Source File: TestApplication.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public static void main(String[] args) throws InterruptedException{
    System.out.println("Creating application..");
    LegacyApplication app = new LegacyApplication();
    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 LegacyApplication();
    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 LegacyApplication();
    app.start(Type.OffscreenSurface);
    Thread.sleep(3000);
    System.out.println("Destroying offscreen buffer");
    app.stop();
}
 
Example 4
Source File: TestBatchNodeCluster.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
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();
}
 
Example 5
Source File: TestBatchNodeCluster.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
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();
}
 
Example 6
Source File: TestCubeCluster.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
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();
}