diff --git a/engine/src/jogl/com/jme3/system/jogl/JoglAbstractDisplay.java b/engine/src/jogl/com/jme3/system/jogl/JoglAbstractDisplay.java index cc3bd31cd..74525df7e 100644 --- a/engine/src/jogl/com/jme3/system/jogl/JoglAbstractDisplay.java +++ b/engine/src/jogl/com/jme3/system/jogl/JoglAbstractDisplay.java @@ -105,15 +105,12 @@ public abstract class JoglAbstractDisplay extends JoglContext implements GLEvent super.removeNotify(); } }; - if (settings.isVSync()) { - canvas.invoke(false, new GLRunnable() { - - public boolean run(GLAutoDrawable glad) { - canvas.getGL().setSwapInterval(1); - return true; - } - }); - } + canvas.invoke(false, new GLRunnable() { + public boolean run(GLAutoDrawable glad) { + canvas.getGL().setSwapInterval(settings.isVSync() ? 1 : 0); + return true; + } + }); canvas.setFocusable(true); canvas.requestFocus(); canvas.setSize(settings.getWidth(), settings.getHeight()); diff --git a/engine/src/jogl/com/jme3/system/jogl/JoglNewtAbstractDisplay.java b/engine/src/jogl/com/jme3/system/jogl/JoglNewtAbstractDisplay.java index 2df311df1..d17f47104 100644 --- a/engine/src/jogl/com/jme3/system/jogl/JoglNewtAbstractDisplay.java +++ b/engine/src/jogl/com/jme3/system/jogl/JoglNewtAbstractDisplay.java @@ -87,15 +87,12 @@ public abstract class JoglNewtAbstractDisplay extends JoglContext implements GLE caps.setNumSamples(settings.getSamples()); } canvas = GLWindow.create(caps); - if (settings.isVSync()) { - canvas.invoke(false, new GLRunnable() { - - public boolean run(GLAutoDrawable glad) { - canvas.getGL().setSwapInterval(1); - return true; - } - }); - } + canvas.invoke(false, new GLRunnable() { + public boolean run(GLAutoDrawable glad) { + canvas.getGL().setSwapInterval(settings.isVSync() ? 1 : 0); + return true; + } + }); canvas.requestFocus(); canvas.setSize(settings.getWidth(), settings.getHeight()); canvas.addGLEventListener(this);