aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/impl/GLContext.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-06-10 19:03:03 +0000
committerKenneth Russel <[email protected]>2005-06-10 19:03:03 +0000
commit7f0f3e8038d45b41796892d9ee7a59fb03fcbcb9 (patch)
treef843812d29f0c990c303f484b19acb29a40f7f72 /src/net/java/games/jogl/impl/GLContext.java
parentc33d64db57f3dd66d012c7d0dd27883beb1f2155 (diff)
Added more debug information
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@299 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/impl/GLContext.java')
-rw-r--r--src/net/java/games/jogl/impl/GLContext.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/net/java/games/jogl/impl/GLContext.java b/src/net/java/games/jogl/impl/GLContext.java
index 5e074f02d..0e20a5691 100644
--- a/src/net/java/games/jogl/impl/GLContext.java
+++ b/src/net/java/games/jogl/impl/GLContext.java
@@ -239,7 +239,7 @@ public abstract class GLContext {
if (mustDoMakeCurrent) {
if (curContext != null) {
if (DEBUG && VERBOSE) {
- System.err.println("Freeing context " + curContext + " due to recursive makeCurrent");
+ System.err.println(getThreadName() + ": Freeing context " + curContext + " due to recursive makeCurrent");
}
curContext.free();
}
@@ -264,7 +264,7 @@ public abstract class GLContext {
return;
}
if (DEBUG && VERBOSE) {
- System.err.println("Making context " + this + " current");
+ System.err.println(getThreadName() + ": Making context " + this + " current");
}
}
ctxStack.push(this, initAction);
@@ -316,7 +316,7 @@ public abstract class GLContext {
// kicks in.
if (mustDoMakeCurrent && !mustSkipFreeForRenderingThread) {
if (DEBUG && VERBOSE) {
- System.err.println("Freeing context " + this);
+ System.err.println(getThreadName() + ": Freeing context " + this);
}
try {
@@ -327,7 +327,7 @@ public abstract class GLContext {
if (curContext != null) {
if (DEBUG && VERBOSE) {
- System.err.println("Making context " + curContext + " current again");
+ System.err.println(getThreadName() + ": Making context " + curContext + " current again");
}
try {
curContext.makeCurrent(curInitAction);
@@ -501,7 +501,7 @@ public abstract class GLContext {
functionAvailability.flush();
if (!haveResetGLUProcAddressTable) {
if (DEBUG) {
- System.err.println("!!! Initializing GLU extension address table");
+ System.err.println(getThreadName() + ": !!! Initializing GLU extension address table");
}
resetProcAddressTable(gluProcAddressTable);
haveResetGLUProcAddressTable = true; // Only need to do this once globally
@@ -647,7 +647,7 @@ public abstract class GLContext {
protected synchronized void setRealized(boolean realized) {
this.realized = realized;
if (DEBUG) {
- System.err.println("GLContext.setRealized(" + realized + ") for context " + this);
+ System.err.println(getThreadName() + ": GLContext.setRealized(" + realized + ") for context " + this);
}
}
@@ -664,7 +664,7 @@ public abstract class GLContext {
if (getRenderingThread() != null &&
Thread.currentThread() != getRenderingThread()) {
if (DEBUG) {
- System.err.println("Deferred destroy for context " + this);
+ System.err.println(getThreadName() + ": Deferred destroy for context " + this);
}
deferredDestroy = true;
return;
@@ -760,4 +760,8 @@ public abstract class GLContext {
}
}
}
+
+ protected static String getThreadName() {
+ return Thread.currentThread().getName();
+ }
}