com.jme3.system.AppSettings.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(162)

本文整理了Java中com.jme3.system.AppSettings.<init>()方法的一些代码示例,展示了AppSettings.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppSettings.<init>()方法的具体详情如下:
包路径:com.jme3.system.AppSettings
类名称:AppSettings
方法名:<init>

AppSettings.<init>介绍

[英]Create a new instance of AppSettings.

If loadDefaults is true, then the default settings will be set on the AppSettings. Use false if you want to change some settings but you would like the application to load settings from previous launches.
[中]创建AppSettings的新实例。
如果loadDefaults为真,则将在AppSettings上设置默认设置。如果要更改某些设置,但希望应用程序从以前的启动加载设置,请使用false。

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void main(String[] args) {
  TestChangeAppIcon app = new TestChangeAppIcon();
  AppSettings settings = new AppSettings(true);
  try {
    Class<TestChangeAppIcon> clazz = TestChangeAppIcon.class;
    settings.setIcons(new BufferedImage[]{
          ImageIO.read(clazz.getResourceAsStream("/Interface/icons/SmartMonkey256.png")),
          ImageIO.read(clazz.getResourceAsStream("/Interface/icons/SmartMonkey128.png")),
          ImageIO.read(clazz.getResourceAsStream("/Interface/icons/SmartMonkey32.png")),
          ImageIO.read(clazz.getResourceAsStream("/Interface/icons/SmartMonkey16.png")),
        });
  } catch (IOException e) {
    log.log(java.util.logging.Level.WARNING, "Unable to load program icons", e);
  }
  app.setSettings(settings);
  app.start();
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void testInitHmd(){
    VREnvironment environment = new VREnvironment(new AppSettings(true));
    environment.initialize();
    OpenVR openVr = (OpenVR) environment.getVRHardware();
    System.out.println(openVr.getName());
    
    openVr.updatePose();
    
    openVr.destroy();
  
  }
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

@Override
public void start(JmeContext.Type contextType){
  AppSettings settings = new AppSettings(true);
  settings.setResolution(1024, 768);
  setSettings(settings);
  super.start(contextType);
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void main(String args[]) {
  TestBatchNodeTower f = new TestBatchNodeTower();
  AppSettings s = new AppSettings(true);
  f.setSettings(s);
  f.start();
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void main(String[] args){
  TestToneMapFilter app = new TestToneMapFilter();
  AppSettings settings = new AppSettings(true);
  
  // Must turn on gamma correction, as otherwise it looks too dark.
  settings.setGammaCorrection(true);
  
  app.setSettings(settings);
  app.start();
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void main(String[] args){
  TestInstanceNode app = new TestInstanceNode();
  AppSettings settings = new AppSettings(true);
  settings.setVSync(false);
  app.setSettings(settings);
  app.start();
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void main(String[] args){
  TestJoystick app = new TestJoystick();
  AppSettings settings = new AppSettings(true);
  settings.setUseJoysticks(true);
  app.setSettings(settings);
  app.start();
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void main(String[] args) {
 TestCameraNode app = new TestCameraNode();
 AppSettings s = new AppSettings(true);
 s.setFrameRate(100);
 app.setSettings(s);
 app.start();
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void main(String[] args){
    TestWriteToTexture app = new TestWriteToTexture();
    AppSettings settings = new AppSettings(true);
    settings.setOpenCLSupport(true);
    settings.setVSync(false);
//        settings.setRenderer(AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE);
    app.setSettings(settings);
    app.start(); // start the game
  }

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

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();
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void main(String[] args){
  TestResizableApp app = new TestResizableApp();
  AppSettings settings = new AppSettings(true);
  settings.setResizable(true);
  app.setSettings(settings);
  app.setShowSettings(false);
  app.start();
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void main(String[] args){
    HelloOpenCL app = new HelloOpenCL();
    AppSettings settings = new AppSettings(true);
    settings.setOpenCLSupport(true);
    settings.setVSync(true);
//        settings.setRenderer(AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE);
    app.setSettings(settings);
    app.start(); // start the game
  }

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void main(String[] args){
    TestOpenCLLibraries app = new TestOpenCLLibraries();
    AppSettings settings = new AppSettings(true);
    settings.setOpenCLSupport(true);
    settings.setVSync(true);
//        settings.setRenderer(AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE);
    app.setSettings(settings);
    app.start(); // start the game
  }

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void main(String[] args){
    TestVertexBufferSharing app = new TestVertexBufferSharing();
    AppSettings settings = new AppSettings(true);
    settings.setOpenCLSupport(true);
    settings.setVSync(false);
//        settings.setRenderer(AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE);
    app.setSettings(settings);
    app.start(); // start the game
  }

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

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);
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void main(String[] args) {
    TestMultiPostWater app = new TestMultiPostWater();
    AppSettings s = new AppSettings(true);
    s.setRenderer(AppSettings.LWJGL_OPENGL2);
    s.setAudioRenderer(AppSettings.LWJGL_OPENAL);
//       
//        s.setRenderer("JOGL");
//        s.setAudioRenderer("JOAL");
    app.setSettings(s);

    app.start();
  }

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public static void main(String[] args) {
  TestBetterCharacter app = new TestBetterCharacter();
  AppSettings settings = new AppSettings(true);
  settings.setRenderer(AppSettings.LWJGL_OPENGL2);
  settings.setAudioRenderer(AppSettings.LWJGL_OPENAL);
  app.setSettings(settings);
  app.start();
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

private void initAudioPlayer(){
  AppSettings settings = new AppSettings(true);
  settings.setRenderer(null); // disable rendering
  settings.setAudioRenderer("LWJGL");
  ar = JmeSystem.newAudioRenderer(settings);
  ar.initialize();
  ar.setListener(listener);
  AudioContext.setAudioRenderer(ar);
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public TestContextSwitching() {
  AppSettings settings = new AppSettings(true);
  settings.setOpenCLSupport(true);
  settings.setVSync(true);
  settings.setWidth(800);
  settings.setHeight(600);
  settings.setOpenCLPlatformChooser(CustomPlatformChooser.class);
  //settings.setRenderer(AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE);
  
  setSettings(settings);
  setShowSettings(false);
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

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();
}
private ActionListener al = new ActionListener() {

相关文章

AppSettings类方法