Time for action – fine-tuning video settings

You can let your users choose video settings, or you can predefine settings that you recommend.

Try the following example:

public static void main(String[] args) {
  AppSettings settings = new AppSettings(true); 
  settings.setVSync(true);
  settings.setFrequency(60);
  settings.setFramerate(30);
  settings.setSamples(4);
  SettingsTest app = new SettingsTest();
  app.setShowSettings(false); // skip default dialog
  app.setSettings(settings);
  app.start();
}

When you run your sample application with these video settings, you should notice softer edges, and less CPU/GPU usage.

What just happened?

To improve video quality, consider activating vertical synchronization (vsync). Vertical synchronization prevents screen tearing—an ...

Get jMonkeyEngine 3.0 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.