38 #ifndef EQ_IGNORE_GLEW
39 # ifdef EQ_FOUND_GLEW_MX
42 # include <GL/glxew.h>
45 # include <GL/wglew.h>
48 # include <eq/GL/glew.h>
50 # include <eq/GL/glxew.h>
53 # include <eq/GL/wglew.h>
59 # include <OpenGL/gl.h>
65 #ifndef GL_TEXTURE_RECTANGLE_ARB
66 # define GL_TEXTURE_RECTANGLE_ARB 0x84F5
68 # define EQ_UNKNOWN_GL_ERROR 0x1 // GL error codes seem to start at 0x500
75 EQ_API
void debugGLError(
const std::string& when,
const GLenum error,
76 const char* file,
const int line );
79 EQ_API std::string
glError(
const GLenum error );
83 # define EQ_GL_ERROR( when ) {}
84 # define EQ_GL_CALL( code ) { code; }
86 # define EQ_GL_ERROR( when ) \
88 const GLenum eqGlError = glGetError(); \
90 eq::debugGLError( when, eqGlError, __FILE__, __LINE__ ); \
93 # define EQ_GL_CALL( code ) \
95 EQ_GL_ERROR( std::string( "before " ) + #code ); \
97 EQ_GL_ERROR( std::string( "after " ) + #code ); \
EQ_API std::string glError(const GLenum error)
EQ_API void debugGLError(const std::string &when, const GLenum error, const char *file, const int line)
Output an error OpenGL in a human-readable form to LBWARN.
Includes operating system headers for OpenGL and the used window system(s) correctly.
The Equalizer client library.