Hi! How do I set VSync to on when the settings dialog is set to not appear. As I see it, when the dialog doesn’t appear, no saved settings are loaded. I’d also wish to load the settings without having the dialog appear
Putting
settings.setVSync( true );
in simpleInitApp() has no effect, and putting it before app.start() as app.settings.setVSync(true); will NPE because settings field is null
EDIT: here this works:
pre type="java"
public class HelloNode4 extends SimpleApplication {
//…
public static void main(String[] args) {
HelloNode4 app = new HelloNode4();
AppSettings settings = new AppSettings(true);
// settings.setTitle(“window title”);
try {
// load the settings that were previously saved by the settings
// dialog when it was shown ie. when app.setShowSettings(true);
settings.load(settings.getTitle());
} catch (BackingStoreException e) {
e.printStackTrace();
}
settings.setVSync(true);// if wasn’t already in load settings
app.setSettings(settings);
app.setShowSettings(false);// don’t show settings dialog
app.start();
}
//…
}/pre
PS: I can also set VSync to on all the time in ATI drivers (as it was before) in ATI Catalyst