Go to the documentation of this file.00001 #include "../pch.h"
00002
00003 void glPrintError(const char* file, const long line)
00004 {
00005 GLenum error = glGetError();
00006 #define CASE(er) case er: printf("%s(%i) %s\n", file, line, #er); break;
00007 switch(error){
00008 CASE(GL_INVALID_ENUM);
00009 CASE(GL_INVALID_VALUE);
00010 CASE(GL_INVALID_OPERATION);
00011 CASE(GL_STACK_OVERFLOW);
00012 CASE(GL_STACK_UNDERFLOW);
00013 CASE(GL_OUT_OF_MEMORY);
00014 CASE(GL_TABLE_TOO_LARGE);
00015 default: break;
00016 }
00017 #undef CASE
00018 }