public static void checkForGLError ( ) { if ( CausticUtil . isDebugEnabled ( ) ) { final int errorValue = GL11 . glGetError ( ) ; if ( errorValue != GL11 . GL_NO_ERROR ) { throw new GLException ( "GL ERROR: " + GLU . gluErrorString ( errorValue ) ) ; } } }
Throws an exception if OpenGL reports an error .