From 4d736527930511cabf2c6604aa831544da917198 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 21 Sep 2014 01:29:54 +0200 Subject: Bug 1066: Reduce glGetError() in GLDrawableHelper.reshape(.., setViewport==true) Only check error if DEBUG || GLContext.DEBUG_GL in GLDrawableHelper.reshape(.., setViewport==true) --- src/jogl/classes/jogamp/opengl/GLDrawableHelper.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl') 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(); } } -- cgit v1.2.3