Difference between revisions of "Example/OpenGL Error Testing"
< Example
Jump to navigation
Jump to search
(Still attempting to fix syntax highlighting.) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
A simple loop to extract the current OpenGL errors: | A simple loop to extract the current OpenGL errors: | ||
− | < | + | <syntaxhighlight lang="cpp"> |
GLenum err; | GLenum err; | ||
while((err = glGetError()) != GL_NO_ERROR) | while((err = glGetError()) != GL_NO_ERROR) | ||
Line 7: | Line 7: | ||
// Process/log the error. | // Process/log the error. | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
<noinclude>[[Category:Example Code]]</noinclude> | <noinclude>[[Category:Example Code]]</noinclude> |
Latest revision as of 02:27, 25 May 2020
A simple loop to extract the current OpenGL errors:
GLenum err;
while((err = glGetError()) != GL_NO_ERROR)
{
// Process/log the error.
}