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