Checks pending OpenGL errors.
OpenGLException if at least one OpenGL error was pending.
See Implementation
Checks pending OpenGL errors.