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