glerrorcheck.h

Go to the documentation of this file.
00001 #ifndef ___UTIL__GLERRORCHECK_HPP__
00002 #define ___UTIL__GLERRORCHECK_HPP__
00003 
00019 #include <config.h>
00020 #include <iostream>
00021 
00022 #define OPENGL_ERROR_CHECK(cmd) \
00023   cmd; \
00024   { \
00025     GLenum error = GL_NO_ERROR; \
00026     while ((error = glGetError()) != GL_NO_ERROR) { \
00027       std::cerr << "OpenGL error found. [ " << __FILE__ \
00028                 << " : " << __LINE__ \
00029                 << " : " << #cmd \
00030                 << " ] \"" << gluErrorString(error) \
00031                 << "\"." << std::endl; \
00032     } \
00033   }
00034 
00035 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Fri May 31 15:37:53 2013 for VVE by  doxygen 1.6.3