summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-05-31 23:35:35 +0000
committerKenneth Russel <[email protected]>2005-05-31 23:35:35 +0000
commit3ef190e389531bedae61b6b73cf1ed1bba13acd8 (patch)
tree17a5087416ee4155daf0bad0c322d4322875febd /src
parent51785653afe2b30a2c24cd4e77c30299a7fa592d (diff)
Reduced printing from jogl.debug.GLContext
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@290 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src')
-rw-r--r--src/net/java/games/jogl/impl/GLContext.java12
-rw-r--r--src/net/java/games/jogl/impl/windows/WindowsGLContext.java2
2 files changed, 9 insertions, 5 deletions
diff --git a/src/net/java/games/jogl/impl/GLContext.java b/src/net/java/games/jogl/impl/GLContext.java
index 98053af1d..5e074f02d 100644
--- a/src/net/java/games/jogl/impl/GLContext.java
+++ b/src/net/java/games/jogl/impl/GLContext.java
@@ -45,6 +45,7 @@ import net.java.games.gluegen.runtime.*;
public abstract class GLContext {
protected static final boolean DEBUG = Debug.debug("GLContext");
+ protected static final boolean VERBOSE = Debug.verbose();
static {
NativeLibLoader.load();
@@ -237,7 +238,7 @@ public abstract class GLContext {
if (mustDoMakeCurrent) {
if (curContext != null) {
- if (DEBUG) {
+ if (DEBUG && VERBOSE) {
System.err.println("Freeing context " + curContext + " due to recursive makeCurrent");
}
curContext.free();
@@ -262,7 +263,7 @@ public abstract class GLContext {
}
return;
}
- if (DEBUG) {
+ if (DEBUG && VERBOSE) {
System.err.println("Making context " + this + " current");
}
}
@@ -314,7 +315,7 @@ public abstract class GLContext {
// Free the context unless the setRenderingThread optimization
// kicks in.
if (mustDoMakeCurrent && !mustSkipFreeForRenderingThread) {
- if (DEBUG) {
+ if (DEBUG && VERBOSE) {
System.err.println("Freeing context " + this);
}
@@ -325,7 +326,7 @@ public abstract class GLContext {
}
if (curContext != null) {
- if (DEBUG) {
+ if (DEBUG && VERBOSE) {
System.err.println("Making context " + curContext + " current again");
}
try {
@@ -662,6 +663,9 @@ public abstract class GLContext {
public synchronized void destroy() throws GLException {
if (getRenderingThread() != null &&
Thread.currentThread() != getRenderingThread()) {
+ if (DEBUG) {
+ System.err.println("Deferred destroy for context " + this);
+ }
deferredDestroy = true;
return;
}
diff --git a/src/net/java/games/jogl/impl/windows/WindowsGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsGLContext.java
index a38383827..367015ce3 100644
--- a/src/net/java/games/jogl/impl/windows/WindowsGLContext.java
+++ b/src/net/java/games/jogl/impl/windows/WindowsGLContext.java
@@ -143,7 +143,7 @@ public abstract class WindowsGLContext extends GLContext {
if (!WGL.wglMakeCurrent(hdc, hglrc)) {
throw new GLException("Error making context current: " + WGL.GetLastError());
} else {
- if (DEBUG) {
+ if (DEBUG && VERBOSE) {
System.err.println("wglMakeCurrent(hdc " + hdcToString(hdc) +
", hglrc " + hdcToString(hglrc) + ") succeeded");
}