diff --git a/src/osg/State.cpp b/src/osg/State.cpp index 525eeb825..a87e96221 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -826,9 +826,13 @@ bool State::checkGLErrors(const char* str) const GLenum errorNo = glGetError(); if (errorNo!=GL_NO_ERROR) { - osg::notify(WARN)<<"Warning: detected OpenGL error '"<className()<<" "<apply(*this); + const char* error = (char*)gluErrorString(errorNo); + if (error) osg::notify(WARN)<<"Warning: detected OpenGL error '"<< error <<"' after applying attribute "<className()<<" "<className()<<" "<