diff --git a/src/osgUtil/SceneView.cpp b/src/osgUtil/SceneView.cpp index a95d7e9df..27f0f856e 100644 --- a/src/osgUtil/SceneView.cpp +++ b/src/osgUtil/SceneView.cpp @@ -1521,11 +1521,8 @@ void SceneView::draw() if (state->getCheckForGLErrors()!=osg::State::NEVER_CHECK_GL_ERRORS) { - GLenum errorNo = glGetError(); - if (errorNo!=GL_NO_ERROR) + if (state->checkGLErrors("end of SceneView::draw()")) { - osg::notify(WARN)<<"Warning: detected OpenGL error '"<setCheckForGLErrors(osg::State::ONCE_PER_ATTRIBUTE);