From 474ada7c9fa2c9e47232abfde66353af58ea35f2 Mon Sep 17 00:00:00 2001 From: Sven Gothel 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 --- src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/jogamp/opengl/x11') diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java index a054d5385..35cb7d02f 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java @@ -81,6 +81,7 @@ import com.jogamp.nativewindow.x11.X11GraphicsScreen; import com.jogamp.opengl.GLRendererQuirks; public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { + private static final boolean DEBUG_SHAREDCTX = DEBUG || GLContext.DEBUG; public static final VersionNumber versionOneZero = new VersionNumber(1, 0, 0); public static final VersionNumber versionOneOne = new VersionNumber(1, 1, 0); @@ -366,7 +367,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { @Override public void releaseSharedResource(final SharedResourceRunner.Resource shared) { final SharedResource sr = (SharedResource) shared; - if (DEBUG) { + if ( DEBUG_SHAREDCTX ) { System.err.println("Shutdown Shared:"); System.err.println("Device : " + sr.device); System.err.println("Screen : " + sr.screen); -- cgit v1.2.3