Example/OpenGL Error Testing

From OpenGL Wiki
< Example
Revision as of 02:27, 25 May 2020 by Alfonse (talk | contribs) (Still attempting to fix syntax highlighting.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A simple loop to extract the current OpenGL errors:

GLenum err;
while((err = glGetError()) != GL_NO_ERROR)
{
  // Process/log the error.
}