summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-06-28 20:56:25 +0200
committerSven Gothel <[email protected]>2012-06-28 20:56:25 +0200
commit53ff91470b73f2f12f0d1cf5cf800a13e46e026e (patch)
treecdf7f7d9945b971044ab38f80596cf13ed94ec59 /src/jogl/classes/javax
parentbd92af2b6b0ae2d1b1f22c64dcb0ffd0e94fae84 (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.java9
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(", ");