00001 #ifndef GLT_ERROR_H
00002 #define GLT_ERROR_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00039 #include <string>
00040
00047 #if defined(NDEBUG)
00048 #define GLERROR
00049 #else
00050 #include <glt/config.h>
00051 #include <glt/gl.h>
00052 #include <glt/glu.h>
00053
00054 #include <iostream>
00055
00056 #define GLERROR \
00057 { \
00058 GLenum code = glGetError(); \
00059 while (code!=GL_NO_ERROR) \
00060 { \
00061 std::cerr << __FILE__; \
00062 std::cerr << ':' << __LINE__; \
00063 std::cerr << ' ' << (char *) gluErrorString(code) << std::endl; \
00064 code = glGetError(); \
00065 } \
00066 }
00067 #endif
00068
00070 void gltError(const std::string &message);
00071
00073 void gltWarning(const std::string &message);
00074
00075 #endif
00076