From 32c40729adce1876b037e7ee9161e96d8cd42dcf Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 17 Oct 2005 09:29:12 +0000 Subject: [PATCH] remove glu dependency again, since it seems some people have trouble compiling it... SVN-Revision: 2858 --- configure.ac | 4 ---- src/video/glutil.hpp | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 0affc1a37..d27a79ce5 100644 --- a/configure.ac +++ b/configure.ac @@ -128,10 +128,6 @@ AX_CHECK_GL if test "$no_gl" = "yes"; then AC_MSG_ERROR([Please install opengl libraries and headers]) fi -AX_CHECK_GLU -if test "$no_glu" = "yes"; then - AC_MSG_ERROR([Please install opengl utility libraries and headers]) -fi dnl Checks for library functions. AC_CHECK_FUNCS(mkdir strdup strstr) diff --git a/src/video/glutil.hpp b/src/video/glutil.hpp index bed97538d..fb55084d8 100644 --- a/src/video/glutil.hpp +++ b/src/video/glutil.hpp @@ -22,7 +22,6 @@ #include #include #include -#include static inline void assert_gl(const char* message) { @@ -31,7 +30,36 @@ static inline void assert_gl(const char* message) if(error != GL_NO_ERROR) { std::ostringstream msg; msg << "OpenGLError while '" << message << "': "; - //<< gluErrorString(error); + switch(error) { + case GL_INVALID_ENUM: + msg << "INVALID_ENUM: An unacceptable value is specified for an " + "enumerated argument."; + break; + case GL_INVALID_VALUE: + msg << "INVALID_VALUE: A numeric argument is out of range."; + break; + case GL_INVALID_OPERATION: + msg << "INVALID_OPERATION: The specified operation is not allowed " + "in the current state."; + break; + case GL_STACK_OVERFLOW: + msg << "STACK_OVERFLOW: This command would cause a stack overflow."; + break; + case GL_STACK_UNDERFLOW: + msg << "STACK_UNDERFLOW: This command would cause a stack underflow."; + break; + case GL_OUT_OF_MEMORY: + msg << "OUT_OF_MEMORY: There is not enough memory left to execute the " + "command."; + break; + case GL_TABLE_TOO_LARGE: + msg << "TABLE_TOO_LARGE: The specified table exceeds the " + "implementation's maximum supported table size."; + break; + default: + msg << "Unknown error (code " << error << ")"; + } + throw std::runtime_error(msg.str()); } #endif -- 2.11.0