From e798db04c83f6dddd4b500d54866b7c4edbe892c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 25 Jan 2016 10:45:07 +0000 Subject: [PATCH] From John Farrier, "Best I can tell, there is an enumeration for NEVER_CHECK_GL_ERRORS in CheckForGLErrors, defined in State. State.cpp does check to see if you want MORE error checking, but there is no way to turn OFF error checking. This change allows disabling of OpenGL error checking." --- src/osg/State.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osg/State.cpp b/src/osg/State.cpp index f81257b09..83af4211e 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -79,6 +79,10 @@ State::State(): { _checkGLErrors = ONCE_PER_ATTRIBUTE; } + else if(str && (strcmp(str, "OFF") == 0 || strcmp(str, "off") == 0)) + { + _checkGLErrors = NEVER_CHECK_GL_ERRORS; + } _currentActiveTextureUnit=0; _currentClientActiveTextureUnit=0;