diff options
Diffstat (limited to 'src/net/java/games/jogl/impl/x11')
-rw-r--r-- | src/net/java/games/jogl/impl/x11/X11OnscreenGLContext.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/net/java/games/jogl/impl/x11/X11OnscreenGLContext.java b/src/net/java/games/jogl/impl/x11/X11OnscreenGLContext.java index 1b5f54979..241a45dc9 100644 --- a/src/net/java/games/jogl/impl/x11/X11OnscreenGLContext.java +++ b/src/net/java/games/jogl/impl/x11/X11OnscreenGLContext.java @@ -103,6 +103,13 @@ public class X11OnscreenGLContext extends X11GLContext { throw new GLException("Should not call this"); } + public void setSwapInterval(int interval) { + GL gl = getGL(); + if (gl.isExtensionAvailable("GLX_SGI_swap_control")) { + gl.glXSwapIntervalSGI(interval); + } + } + protected synchronized boolean makeCurrent(Runnable initAction) throws GLException { try { if (!lockSurface()) { |