diff options
author | Sven Gothel <[email protected]> | 2009-06-18 13:36:23 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-06-18 13:36:23 +0000 |
commit | c4328086d4523ea063c0b88cc1cbd935ee70fdfa (patch) | |
tree | c344aad90ee523480ac41e14c06b2982e8e6b0e5 /src/jogl/classes/com/sun/opengl | |
parent | a589761892ea2eb42a672951fcfe6e72786ac79b (diff) |
- Removed useless GLX synchronized hacks in X11GLXGraphicsConfiguration
- Multithreading / Locking ..
It turns out that there exist platforms with a
buggy thread safe OpenGL/GLX/.. implementation.
E.g. Linux x86_64, NV 185.18.14 where 1/6 attempts
of the test case
java -Djava.awt.headless=true demos.es2.RedSquare -GL2 -GL2 -GL2 -GL2
will result in:
C [libGL.so.1+0x5c08a] glXGetFBConfigAttrib+0x40a
[error occurred during error reporting (printing native stack), id 0xb]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.sun.opengl.impl.x11.glx.GLX.glXGetFBConfigAttrib1(JJILjava/lang/Object;I)I+0
j com.sun.opengl.impl.x11.glx.GLX.glXGetFBConfigAttrib(JJI[II)I+67
j com.sun.opengl.impl.x11.glx.X11GLXGraphicsConfiguration.glXGetFBConfig(JJI[II)I+24
In these cases, you can set the system property
nativewindow.locking=true
to always use the generic reentrance capable
LockingNativeWindowFactory implementation as a last resort.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1992 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/jogl/classes/com/sun/opengl')
-rw-r--r-- | src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java index 83f671cb4..7b59a8d56 100644 --- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java +++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java @@ -288,10 +288,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem // FBConfig - // sgothel: The synchronized was added, due to bugs within the GLX implementation on my platform - // in regards to multithreading (FIXME). - - public synchronized static GLCapabilities GLXFBConfig2GLCapabilities(GLProfile glp, long display, long fbcfg, boolean isMultisampleEnabled) { + public static GLCapabilities GLXFBConfig2GLCapabilities(GLProfile glp, long display, long fbcfg, boolean isMultisampleEnabled) { int[] tmp = new int[1]; int val; val = glXGetFBConfig(display, fbcfg, GLX.GLX_RENDER_TYPE, tmp, 0); @@ -336,7 +333,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem return res; } - private synchronized static String glXGetFBConfigErrorCode(int err) { + private static String glXGetFBConfigErrorCode(int err) { switch (err) { case GLX.GLX_NO_EXTENSION: return "GLX_NO_EXTENSION"; case GLX.GLX_BAD_ATTRIBUTE: return "GLX_BAD_ATTRIBUTE"; @@ -344,7 +341,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem } } - public synchronized static int glXGetFBConfig(long display, long cfg, int attrib, int[] tmp, int tmp_offset) { + public static int glXGetFBConfig(long display, long cfg, int attrib, int[] tmp, int tmp_offset) { if (display == 0) { throw new GLException("No display connection"); } |