diff options
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/x11/glx')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java index 2ae53fb9d..4b84227c3 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java @@ -223,17 +223,17 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { * The dummy context shall also use the same Display, * since switching Display in this regard is another ATI bug. */ - boolean usedSharedContext=false; if( isVendorATI() && null == GLContext.getCurrent() ) { - sharedContext.makeCurrent(); - usedSharedContext=true; - } - try { - pbufferDrawable = new X11PbufferGLXDrawable(this, target); - } finally { - if(usedSharedContext) { - sharedContext.release(); + synchronized(sharedContext) { + sharedContext.makeCurrent(); + try { + pbufferDrawable = new X11PbufferGLXDrawable(this, target); + } finally { + sharedContext.release(); + } } + } else { + pbufferDrawable = new X11PbufferGLXDrawable(this, target); } return pbufferDrawable; } |