From 474ada7c9fa2c9e47232abfde66353af58ea35f2 Mon Sep 17 00:00:00 2001 From: Sven Gothel <sgothel@jausoft.com> Date: Fri, 23 Jan 2015 20:36:13 +0100 Subject: 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 --- .../classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java') 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(); } -- cgit v1.2.3