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.
To improve video quality, consider activating vertical synchronization (vsync). Vertical synchronization prevents screen tearing—an annoying video glitch where part of a frame lags behind and shows the previous frame. Use vsync to cap the frame rate to the monitor's refresh rate, typically 60, 75, or 120 fps (frames per second), depending on the display...