glutReportErrors man page
glutReportErrors — Reports all available OpenGL errors.
OpenGLUT - opengl
Displays as an OpenGLUT warning every OpenGL error that OpenGL remembers giving to us and which we have not processed. Uses gluErrorString().
This is forcibly done by OpenGLUT periodically if "-gldebug" is one of the strings passed into glutInit() via argv.