diff options
author | Rami Santina <[email protected]> | 2011-09-30 22:37:24 +0300 |
---|---|---|
committer | Rami Santina <[email protected]> | 2011-09-30 22:37:24 +0300 |
commit | 274cabe94fef1fbea3d77407d7ee532235376022 (patch) | |
tree | e5bd348aae68c59344c70ce65ab6641f018877de /src/jogl/classes/jogamp/opengl/GLContextImpl.java | |
parent | 18817fe6d3b85fcb672a2dd244f3fad3fdab2aa3 (diff) | |
parent | efb2e94cfafc3eab39f729f2445006fc4e86b986 (diff) |
Merge branch 'android-tegra-playground' of git://github.com/sgothel/jogl into android-tegra-playground
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 6f2786b03..99693aabe 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -380,7 +380,10 @@ public abstract class GLContextImpl extends GLContext { if (null == getGLDrawable().getChosenGLCapabilities()) { throw new GLException("drawable has no chosen GLCapabilities: "+getGLDrawable()); } - additionalCtxCreationFlags |= DEBUG_GL ? GLContext.CTX_OPTION_DEBUG : 0 ; + if(DEBUG_GL) { + // only impacts w/ createContextARB(..) + additionalCtxCreationFlags |= GLContext.CTX_OPTION_DEBUG ; + } } lockConsiderFailFast(); @@ -408,14 +411,17 @@ public abstract class GLContextImpl extends GLContext { // throws an GLException if not getGLDrawable().getGLProfile().verifyEquality(gl.getGLProfile()); + glDebugHandler.init( isGL2GL3() && isGLDebugEnabled() ); + if(DEBUG_GL) { gl = gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", null, gl, null) ); - glDebugHandler.addListener(new GLDebugMessageHandler.StdErrGLDebugListener(true)); + if(glDebugHandler.isEnabled()) { + glDebugHandler.addListener(new GLDebugMessageHandler.StdErrGLDebugListener(true)); + } } if(TRACE_GL) { gl = gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Trace", null, gl, new Object[] { System.err } ) ); } - glDebugHandler.init(0 != (additionalCtxCreationFlags & GLContext.CTX_OPTION_DEBUG)); } /* FIXME: refactor dependence on Java 2D / JOGL bridge |