aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/x11/glx
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-10 04:51:28 +0100
committerSven Gothel <[email protected]>2012-03-10 04:51:28 +0100
commitf0f696c4253691503a0d66636ea779e0731bda84 (patch)
tree74007b3923b06e040528429f7503715af74bc1a4 /src/jogl/classes/jogamp/opengl/x11/glx
parent42a08f9c8a6b86a104d9feba6e29397933b020c5 (diff)
GL/GLContext: Properly define swapInterval incl. default value for EGL (1) and desktop (undefined).
*GLContext.setSwapIntervalImpl: Simple return success, set state in GLContext.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/x11/glx')
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
index 79361ac0c..1dc1441e1 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
@@ -509,10 +509,10 @@ public abstract class X11GLXContext extends GLContextImpl {
}
@Override
- protected void setSwapIntervalImpl(int interval) {
+ protected boolean setSwapIntervalImpl(int interval) {
X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration();
GLCapabilitiesImmutable glCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
- if(!glCaps.isOnscreen()) return;
+ if(!glCaps.isOnscreen()) { return false; }
GLXExt glXExt = getGLXExt();
if(0==hasSwapIntervalSGI) {
@@ -522,11 +522,10 @@ public abstract class X11GLXContext extends GLContextImpl {
}
if (hasSwapIntervalSGI>0) {
try {
- if( 0 == glXExt.glXSwapIntervalSGI(interval) ) {
- currentSwapInterval = interval;
- }
+ return 0 == glXExt.glXSwapIntervalSGI(interval);
} catch (Throwable t) { hasSwapIntervalSGI=-1; }
}
+ return false;
}
private final int initSwapGroupImpl(GLXExt glXExt) {