diff options
author | Sven Gothel <[email protected]> | 2012-06-28 20:56:25 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-06-28 20:56:25 +0200 |
commit | 53ff91470b73f2f12f0d1cf5cf800a13e46e026e (patch) | |
tree | cdf7f7d9945b971044ab38f80596cf13ed94ec59 /src/jogl/classes/javax | |
parent | bd92af2b6b0ae2d1b1f22c64dcb0ffd0e94fae84 (diff) |
GLContext* TRACE_SWITCH: Add GLContext instance hash value to allow tracking.
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLContext.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java index 19501e589..dfae76e73 100644 --- a/src/jogl/classes/javax/media/opengl/GLContext.java +++ b/src/jogl/classes/javax/media/opengl/GLContext.java @@ -52,6 +52,7 @@ import com.jogamp.common.util.locks.RecursiveLock; import jogamp.opengl.Debug; import jogamp.opengl.GLContextImpl; +import jogamp.opengl.GLContextShareSet; /** Abstraction for an OpenGL rendering context. In order to perform OpenGL rendering, a context must be "made current" on the current @@ -303,7 +304,11 @@ public abstract class GLContext { */ protected static void setCurrent(GLContext cur) { if(TRACE_SWITCH) { - System.err.println(getThreadName()+": GLContext.ContextSwitch: - setCurrent() - "+cur); + if(null == cur) { + System.err.println(getThreadName()+": GLContext.ContextSwitch: - setCurrent() - NULL"); + } else { + System.err.println(getThreadName()+": GLContext.ContextSwitch: - setCurrent() - obj " + toHexString(cur.hashCode()) + ", ctx " + toHexString(cur.getHandle())); + } } currentContext.set(cur); } @@ -404,6 +409,8 @@ public abstract class GLContext { sb.append(Integer.toHexString(ctxOptions)); sb.append(", "); sb.append(getGLVersion()); + sb.append(", this "); + sb.append(toHexString(hashCode())); sb.append(", handle "); sb.append(toHexString(contextHandle)); sb.append(", "); |