diff options
author | Sven Gothel <[email protected]> | 2013-10-29 11:10:58 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-10-29 11:10:58 +0100 |
commit | d83d54f2aaf9b8389a64fba7a8c05c495873d941 (patch) | |
tree | ec9cd517a171018e1242b407b7b429dfad8933eb /src/jogl/classes/jogamp/opengl/GLContextImpl.java | |
parent | 5dffa6a4895a06edc44de6fe335c35af291fbd19 (diff) |
Bug 876: BuildComposablePipeline: getGL*() shall not return downstream.getGL*() [TraceGL* / DebugGL*] ; Simplify GLContextImpl's set Debug/Trace Pipeline
Regression of commit 0002fccdcd6383874b2813dc6bbe3e33f5f00924:
"Trace/Debug shall utilize downstream identification for isGL*() and getGL*() methods."
Using the downstream identification commit is right for the isGL*() case,
however, getGL*() returned the downstream object which makes the caller loosing the pipeline!
Instead, we shall produce !GEN_GL_IDENTITY_BY_ASSIGNABLE_CLASS:
"if( isGL<type>() ) { return this; }
throw new GLException("Not a <type> implementation");"
or for GEN_GL_IDENTITY_BY_ASSIGNABLE_CLASS:
"return this;"
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 377ebd9f5..4e5465906 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -280,11 +280,11 @@ public abstract class GLContextImpl extends GLContext { @Override public GL setGL(GL gl) { - if(DEBUG) { - String sgl1 = (null!=this.gl)?this.gl.getClass().getSimpleName()+", "+this.gl.toString():"<null>"; - String sgl2 = (null!=gl)?gl.getClass().getSimpleName()+", "+gl.toString():"<null>"; - Exception e = new Exception("Info: setGL (OpenGL "+getGLVersion()+"): "+getThreadName()+", "+sgl1+" -> "+sgl2); - e.printStackTrace(); + if( DEBUG ) { + final String sgl1 = (null!=this.gl)?this.gl.getClass().getSimpleName()+", "+this.gl.toString():"<null>"; + final String sgl2 = (null!=gl)?gl.getClass().getSimpleName()+", "+gl.toString():"<null>"; + System.err.println("Info: setGL (OpenGL "+getGLVersion()+"): "+getThreadName()+", "+sgl1+" -> "+sgl2); + Thread.dumpStack(); } this.gl = gl; return gl; @@ -600,13 +600,13 @@ public abstract class GLContextImpl extends GLContext { glDebugHandler.init( isGL2GL3() && isGLDebugEnabled() ); if(DEBUG_GL) { - gl = gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", null, gl, null) ); + setGL( GLPipelineFactory.create("javax.media.opengl.Debug", null, gl, null) ); 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 } ) ); + setGL( GLPipelineFactory.create("javax.media.opengl.Trace", null, gl, new Object[] { System.err } ) ); } forceDrawableAssociation = true; |