From e748f469a21a4e9cd5ae2421f594bd88afd42bec Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Fri, 4 Feb 2005 03:21:23 +0000 Subject: Fixed bug in X11GLContext where additional locking was needed in pbuffer case. Doesn't seem to (and shouldn't) affect the normal onscreen case. Added additional debugging output. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@210 232f8b59-042b-4e1e-8c03-345bb8c30851 --- .../java/games/jogl/impl/FunctionAvailabilityCache.java | 4 ++++ src/net/java/games/jogl/impl/x11/X11GLContext.java | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'src/net/java/games/jogl/impl') diff --git a/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java b/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java index 01a70e4b7..a4b67b5e8 100644 --- a/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java +++ b/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java @@ -114,6 +114,10 @@ public final class FunctionAvailabilityCache { } String allAvailableExtensions = gl.glGetString(GL.GL_EXTENSIONS) + " " + context.getPlatformExtensionsString(); + if (DEBUG) { + System.err.println("!!! Available extensions: " + allAvailableExtensions); + System.err.println("!!! GL vendor: " + gl.glGetString(GL.GL_VENDOR)); + } StringTokenizer tok = new StringTokenizer(allAvailableExtensions); while (tok.hasMoreTokens()) { String availableExt = tok.nextToken().trim(); diff --git a/src/net/java/games/jogl/impl/x11/X11GLContext.java b/src/net/java/games/jogl/impl/x11/X11GLContext.java index 1f8023e66..eb5c7fdf6 100644 --- a/src/net/java/games/jogl/impl/x11/X11GLContext.java +++ b/src/net/java/games/jogl/impl/x11/X11GLContext.java @@ -237,6 +237,11 @@ public abstract class X11GLContext extends GLContext { if (!GLX.glXQueryVersion(display, major, minor)) { throw new GLException("glXQueryVersion failed"); } + if (DEBUG) { + System.err.println("!!! GLX version: major " + major[0] + + ", minor " + minor[0]); + } + isGLX13 = ((major[0] > 1) || (minor[0] > 2)); } @@ -258,7 +263,16 @@ public abstract class X11GLContext extends GLContext { glXQueryExtensionsStringInitialized = true; } if (glXQueryExtensionsStringAvailable) { - return GLX.glXQueryExtensionsString(display, GLX.DefaultScreen(display)); + lockAWT(); + try { + String ret = GLX.glXQueryExtensionsString(display, GLX.DefaultScreen(display)); + if (DEBUG) { + System.err.println("!!! GLX extensions: " + ret); + } + return ret; + } finally { + unlockAWT(); + } } else { return ""; } -- cgit v1.2.3