summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-04-23 07:58:08 +0200
committerSven Gothel <[email protected]>2013-04-23 07:58:08 +0200
commit47dca9c0af7ba6240aa11e154fbfafbd07c6cfbd (patch)
tree0dffc7b354dcf2dfe568a97906c17e0dbd3e1d68 /src/jogl/classes
parent471ae0dea0666398f181baea4d4e91ca666fd46c (diff)
X11GLXContext: Issue XSync(..) after forcing X11ErrorHandle and before glXCreateContextAttribsARB(..) - Mitigate driver bugs
Ensures the error handler is in place and previous X11 cmds are being executed before the 'critical' glXCreateContextAttribsARB(..) call which might lead to erroneous behavior w/ buggy drivers.
Diffstat (limited to 'src/jogl/classes')
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
index c3c35ed49..9df042ba8 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
@@ -53,6 +53,7 @@ import javax.media.opengl.GLContext;
import javax.media.opengl.GLException;
import javax.media.opengl.GLProfile;
+import jogamp.nativewindow.x11.X11Lib;
import jogamp.nativewindow.x11.X11Util;
import jogamp.opengl.GLContextImpl;
import jogamp.opengl.GLDrawableImpl;
@@ -246,6 +247,7 @@ public class X11GLXContext extends GLContextImpl {
// critical path, a remote display might not support this command,
// hence we need to catch the X11 Error within this block.
X11Util.setX11ErrorHandler(true, DEBUG ? false : true); // make sure X11 error handler is set
+ X11Lib.XSync(display, false);
ctx = _glXExt.glXCreateContextAttribsARB(display, config.getFBConfig(), share, direct, attribs);
} catch (RuntimeException re) {
if(DEBUG) {