aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/macosx
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-01-23 20:36:13 +0100
committerSven Gothel <[email protected]>2015-01-23 20:36:13 +0100
commit474ada7c9fa2c9e47232abfde66353af58ea35f2 (patch)
tree48b935e48c72aaa9794ed931041032961bc8047e /src/jogl/classes/jogamp/opengl/macosx
parent38baef0371fc55405779590d503f6e0de10fa9cc (diff)
Misc Fix: GLContext*; Refine DEBUG output in GLDrawableFactory's createShareResource
- Fix GLContext.makeCurrent() API doc for 'throws GLException' - Fix GLContext.makeCurrentResultToString(int): CONTEXT_CURRENT_NEW -> "CONTEXT_CURRENT_NEW" - Fix GLContextImpl.setGLDrawable(..) - Catch Throwable instead of GLException to not loose other cases - Fix GLContextImpl.makeCurrent(..) - Use const l-value in branch expression - fix semantic typo: validate -> validated - Refine DEBUG output in GLDrawableFactory's createShareResource - Enable DEBUG via GLContext.DEBUG as well to ease analysis w/o drawable DEBUG output
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/macosx')
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
index cb691a7ab..73e01de08 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
@@ -402,7 +402,7 @@ public class MacOSXCGLContext extends GLContextImpl
@Override
protected void copyImpl(final GLContext source, final int mask) throws GLException {
if( isNSContext() != ((MacOSXCGLContext)source).isNSContext() ) {
- throw new GLException("Source/Destination OpenGL Context tyoe mismatch: source "+source+", dest: "+this);
+ throw new GLException("Source/Destination OpenGL Context type mismatch: source "+source+", dest: "+this);
}
if(!impl.copyImpl(source.getHandle(), mask)) {
throw new GLException("Error copying OpenGL Context: source "+source+", dest: "+this);
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
index fe054e419..933b8eef9 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
@@ -81,6 +81,8 @@ import com.jogamp.opengl.GLExtensions;
import com.jogamp.opengl.GLRendererQuirks;
public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
+ private static final boolean DEBUG_SHAREDCTX = DEBUG || GLContext.DEBUG;
+
private static DesktopGLDynamicLookupHelper macOSXCGLDynamicLookupHelper = null;
public MacOSXCGLDrawableFactory() {
@@ -281,7 +283,7 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
try {
sharedContext.destroy();
} catch (final GLException gle) {
- if (DEBUG) {
+ if ( DEBUG_SHAREDCTX ) {
System.err.println("MacOSXCGLDrawableFactory.createShared: INFO: destroy caught exception:");
gle.printStackTrace();
}