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 #ifndef GLX_RGBA_FLOAT_BIT
69 # define GLX_RGBA_FLOAT_BIT GLX_RGBA_FLOAT_BIT_ARB
70 # define GLX_RGBA_FLOAT_TYPE GLX_RGBA_FLOAT_TYPE_ARB
73 # define EQ_UNKNOWN_GL_ERROR 0x1 // GL error codes seem to start at 0x500
80 EQ_API
void debugGLError(
const std::string& when,
const GLenum error,
81 const char* file,
const int line );
84 EQ_API std::string
glError(
const GLenum error );
88 # define EQ_GL_ERROR( when ) {}
89 # define EQ_GL_CALL( code ) { code; }
91 # define EQ_GL_ERROR( when ) \
93 const GLenum eqGlError = glGetError(); \
95 eq::debugGLError( when, eqGlError, __FILE__, __LINE__ ); \
98 # define EQ_GL_CALL( code ) \
100 EQ_GL_ERROR( std::string( "before " ) + #code ); \
102 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.