diff --git a/src/osgUtil/RenderStage.cpp b/src/osgUtil/RenderStage.cpp index 1cdcecf34..5d7173de2 100644 --- a/src/osgUtil/RenderStage.cpp +++ b/src/osgUtil/RenderStage.cpp @@ -629,11 +629,14 @@ void RenderStage::drawInner(osg::State& state,RenderLeaf*& previous, bool& doCop RenderBin::draw(state,previous); - GLenum errorNo = glGetError(); - if (errorNo!=GL_NO_ERROR) + if(state.getCheckForGLErrors()!=osg::State::NEVER_CHECK_GL_ERRORS) { - osg::notify(osg::NOTICE)<<"RenderStage::drawInner(,) OpenGL errorNo= 0x"<glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT)<glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT)<