summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/macosx/cgl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-04-10 02:49:14 +0200
committerSven Gothel <[email protected]>2013-04-10 02:49:14 +0200
commiteff09c3545f32f1f481198d57de71a5bf564e797 (patch)
tree704faeb913d7d396ac10ee3dafa6a4aef7b9f595 /src/jogl/classes/jogamp/opengl/macosx/cgl
parent2b3bb9426385d97375c3312f5c0f4e2a827b1fbb (diff)
Debug Messages: Unify getThreadName() usage and 'Catched Exception' messages
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/macosx/cgl')
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java10
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java2
3 files changed, 6 insertions, 10 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
index f99d89df7..a197bd51f 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
@@ -669,7 +669,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
setSwapIntervalImpl(nsOpenGLLayer, interval); // enabled per default in layered surface
valid = true;
if (DEBUG) {
- System.err.println("NSOpenGLLayer.Attach: OK, layer "+toHexString(nsOpenGLLayer)+" w/ pbuffer "+toHexString(pbuffer)+", texID "+texID+", texSize "+lastWidth+"x"+lastHeight+", drawableHandle "+toHexString(drawable.getHandle())+" - "+Thread.currentThread().getName());
+ System.err.println("NSOpenGLLayer.Attach: OK, layer "+toHexString(nsOpenGLLayer)+" w/ pbuffer "+toHexString(pbuffer)+", texID "+texID+", texSize "+lastWidth+"x"+lastHeight+", drawableHandle "+toHexString(drawable.getHandle())+" - "+getThreadName());
}
} finally {
MacOSXCGLContext.this.lock.unlock();
@@ -685,7 +685,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
if( !valid ) {
// could not acquire lock, re-queue
if (DEBUG) {
- System.err.println("NSOpenGLLayer.Attach: Re-Queue, drawableHandle "+toHexString(drawable.getHandle())+" - "+Thread.currentThread().getName());
+ System.err.println("NSOpenGLLayer.Attach: Re-Queue, drawableHandle "+toHexString(drawable.getHandle())+" - "+getThreadName());
}
OSXUtil.RunLater(this, 1);
}
@@ -713,17 +713,17 @@ public abstract class MacOSXCGLContext extends GLContextImpl
ols.detachSurfaceLayer();
}
} catch(Throwable t) {
- System.err.println("Catched exception @ "+Thread.currentThread().getName()+": ");
+ System.err.println("Catched Exception on thread "+getThreadName());
t.printStackTrace();
}
CGL.releaseNSOpenGLLayer(cmd.nsOpenGLLayer);
if(DEBUG) {
- System.err.println("NSOpenGLLayer.Detach: OK, layer "+toHexString(cmd.nsOpenGLLayer)+" - "+Thread.currentThread().getName());
+ System.err.println("NSOpenGLLayer.Detach: OK, layer "+toHexString(cmd.nsOpenGLLayer)+" - "+getThreadName());
}
cmd.nsOpenGLLayer = 0;
cmd.valid = false;
} else if(DEBUG) {
- System.err.println("NSOpenGLLayer.Detach: Skipped "+toHexString(cmd.nsOpenGLLayer)+" - "+Thread.currentThread().getName());
+ System.err.println("NSOpenGLLayer.Detach: Skipped "+toHexString(cmd.nsOpenGLLayer)+" - "+getThreadName());
}
}
}
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java
index 1daa892ba..910158d1f 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java
@@ -152,10 +152,6 @@ public abstract class MacOSXCGLDrawable extends GLDrawableImpl {
return getFactoryImpl().getGLDynamicLookupHelper(0);
}
- protected static String getThreadName() {
- return Thread.currentThread().getName();
- }
-
// Support for "mode switching" as described in MacOSXCGLDrawable
public void setOpenGLMode(GLBackendType mode) {
if (mode == openGLMode) {
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
index aaca7c78a..6c647108f 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
@@ -291,7 +291,7 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
}
} catch (GLException gle) {
if(DEBUG) {
- System.err.println("Catched Exception while MaxOSXCGL Shared Resource initialization:");
+ System.err.println("Catched Exception on thread "+getThreadName());
gle.printStackTrace();
}
}