X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fvideo%2Fglutil.hpp;h=b19ce8b1016bb27bc7cfaafb81f4eb3ed9159955;hb=e7a12ed844f040d270e50ce25f74de5f017c1157;hp=0ccb63006bf66e9cd2ac4a09026465e596075787;hpb=c62711567861587107d124642db29e2674ee6533;p=supertux.git diff --git a/src/video/glutil.hpp b/src/video/glutil.hpp index 0ccb63006..b19ce8b10 100644 --- a/src/video/glutil.hpp +++ b/src/video/glutil.hpp @@ -19,9 +19,14 @@ #ifndef __GLUTIL_HPP__ #define __GLUTIL_HPP__ +#include + +#ifdef HAVE_OPENGL + #include #include #include +#include static inline void check_gl_error(const char* message) { @@ -56,13 +61,15 @@ static inline void check_gl_error(const char* message) case GL_TABLE_TOO_LARGE: msg << "TABLE_TOO_LARGE: table is too large"; break; -#endif +#endif default: msg << "Unknown error (code " << error << ")"; } - + throw std::runtime_error(msg.str()); } +#else + (void) message; #endif } @@ -75,4 +82,15 @@ static inline void assert_gl(const char* message) #endif } +#else + +#define GLenum int +#define GLint int +#define GL_SRC_ALPHA 0 +#define GL_ONE_MINUS_SRC_ALPHA 1 +#define GL_RGBA 2 +#define GL_ONE 3 + +#endif + #endif