Define the OPENGL_ERROR_CHECK macro. More...
#include <config.h>
#include <iostream>
Go to the source code of this file.
Defines | |
#define | OPENGL_ERROR_CHECK(cmd) |
The following macro checks if an OpenGL has occurred. |
Define the OPENGL_ERROR_CHECK macro.
Definition in file glerrorcheck.h.
#define OPENGL_ERROR_CHECK | ( | cmd | ) |
cmd; \ { \ GLenum error = GL_NO_ERROR; \ while ((error = glGetError()) != GL_NO_ERROR) { \ std::cerr << "OpenGL error found. [ " << __FILE__ \ << " : " << __LINE__ \ << " : " << #cmd \ << " ] \"" << gluErrorString(error) \ << "\"." << std::endl; \ } \ }
The following macro checks if an OpenGL has occurred.
cmd | The command to check. |
This macro is based on that found in the notes for SIGGRAPH 2003 Course 26. It is modified here to use C++ (it was originally in C) and in the output format.
Definition at line 22 of file glerrorcheck.h.