diff options
author | Sven Gothel <[email protected]> | 2013-10-29 03:06:57 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-10-29 03:06:57 +0100 |
commit | 9b133d6b0408d08e79f2973eabd4d1d29c695747 (patch) | |
tree | 56832a1759d0bb0e4e1f25e00cfabf3da12732ac /src/jogl/classes | |
parent | 3598b398dfd39502078f3750ad97bbbece060846 (diff) |
GLDrawableHelper.reshape(): Catch pre-existing GL errors before glViewport(..) and dump it (Add stack trace if DEBUG)
Diffstat (limited to 'src/jogl/classes')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLDrawableHelper.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java index cf5d7a206..61735c487 100644 --- a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java +++ b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java @@ -48,6 +48,7 @@ import javax.media.nativewindow.NativeSurface; import javax.media.nativewindow.NativeWindowException; import javax.media.nativewindow.ProxySurface; import javax.media.nativewindow.UpstreamSurfaceHook; +import javax.media.opengl.GL; import javax.media.opengl.GLAnimatorControl; import javax.media.opengl.GLAutoDrawable; import javax.media.opengl.GLContext; @@ -662,6 +663,14 @@ public class GLDrawableHelper { } } if(setViewport) { + final GL gl = drawable.getGL(); + final int glerr0 = gl.glGetError(); + if( GL.GL_NO_ERROR != glerr0 ) { + System.err.println("Info: GLDrawableHelper.reshape: pre-exisiting GL error 0x"+Integer.toHexString(glerr0)); + if(DEBUG) { + Thread.dumpStack(); + } + } drawable.getGL().glViewport(x, y, width, height); } listener.reshape(drawable, x, y, width, height); |