Remove bogus assert
[supertux.git] / src / video / glutil.hpp
index 4d5af68..4ead32d 100644 (file)
 #include <sstream>
 #include <stdexcept>
 
+
+#ifdef USE_GLBINDING
+
+#include <glbinding/gl/gl.h>
+using namespace gl;
+
+#else
+
+#ifndef GL_VERSION_ES_CM_1_0
+#  include <GL/glew.h>
+#endif
+
 #if defined(MACOSX)
 #  include <OpenGL/gl.h>
 #  include <OpenGL/glext.h>
 #  include <GL/glext.h>
 #endif
 
+#endif
+
 static inline void check_gl_error(const char* message)
 {
-#ifdef DEBUG
   GLenum error = glGetError();
   if(error != GL_NO_ERROR) {
     std::ostringstream msg;
@@ -75,18 +88,11 @@ static inline void check_gl_error(const char* message)
 
     throw std::runtime_error(msg.str());
   }
-#else
-  (void) message;
-#endif
 }
 
 static inline void assert_gl(const char* message)
 {
-#ifdef DEBUG
   check_gl_error(message);
-#else
-  (void) message;
-#endif
 }
 
 #else