From 4b2912e0968e521a44fe0aa282c4fd5ab130d254 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 fba546105..bf3688e12 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -80,6 +80,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;