Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

gl_aux.h

Go to the documentation of this file.
00001 
00006 #ifndef UTIL_GL_AUX_H
00007 #define UTIL_GL_AUX_H
00008 
00009 #include "annie/defines.h"
00010 #ifdef HAVE_OPENGL
00011 
00012 #include <iostream>
00013 #include <GL/gl.h>
00014 namespace annie {
00015 #define E(a)    case a: std::cerr << #a; break;
00016 inline void prGLErr(GLenum e)   {
00017     switch(e)   {
00018         E(GL_INVALID_VALUE)
00019         E(GL_INVALID_ENUM)
00020         E(GL_INVALID_OPERATION)
00021         E(GL_STACK_OVERFLOW)
00022         E(GL_STACK_UNDERFLOW)
00023         E(GL_OUT_OF_MEMORY)
00024         default: ASSERT(0);
00025     }
00026 }
00027 #undef E
00028 
00029 #define GLE \
00030     { GLenum e = glGetError();  \
00031         if(e)   {   \
00032             prGLErr(e); \
00033             /*assert(0);*/  \
00034         }   \
00035     }
00036 
00037 } // annie
00038 #endif
00039 #endif

Generated on Fri Jun 18 13:18:10 2004 for Annie by doxygen 1.3.5