summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-21 01:29:54 +0200
committerSven Gothel <[email protected]>2014-09-21 01:29:54 +0200
commit4d736527930511cabf2c6604aa831544da917198 (patch)
tree2c7a0df1208b82d549f15ac85f7b8658a45e8465
parent7749f0567fb592ee4b3f698bd2424a5687b02f47 (diff)
Bug 1066: Reduce glGetError() in GLDrawableHelper.reshape(.., setViewport==true)
Only check error if DEBUG || GLContext.DEBUG_GL in GLDrawableHelper.reshape(.., setViewport==true)
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableHelper.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
index 25ff83fc0..edf20cc62 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
@@ -727,11 +727,10 @@ 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) {
+ if( GLContext.DEBUG_GL || DEBUG ) {
+ final int glerr0 = drawable.getGL().glGetError();
+ if( GL.GL_NO_ERROR != glerr0 ) {
+ System.err.println("Info: GLDrawableHelper.reshape: pre-exisiting GL error 0x"+Integer.toHexString(glerr0));
Thread.dumpStack();
}
}