I decided to try and use the glGetError at the bottom of my paintGL( ) function inside a Qt application containing a QGLWidget. painGL( ) is my Display( ) function. I put the glGetError call at the end of the function and I get an “invalid value” error. The call I make before this is a glFlush( ) call. How do I know what my “invalid value” is? Thanks for your help!

All that tells you is that somewhere prior to the point you called glGetError, you made a GL call which returned that error. It doesn’t mean glFlush caused the error-- just some function call prior to the point where you called glGetError.

To find the offending call, you should now insert more glGetError calls around the rest of your functions.

Or, use a profiling tool and break on error.