This repository has been archived on 2022-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
space-war/glhelpfunc.cpp

20 lines
434 B
C++

#include "glhelpfunc.hpp"
#define CASE(e) case e: return #e;
const char* GLGetErrorString(GLenum err) {
switch (err) {
CASE(GL_NO_ERROR)
CASE(GL_INVALID_ENUM)
CASE(GL_INVALID_VALUE)
CASE(GL_INVALID_OPERATION)
CASE(GL_OUT_OF_MEMORY)
CASE(GL_INVALID_FRAMEBUFFER_OPERATION)
default:
return "Unknown OpenGL Error";
}
return "Unknown Error";
}
#undef CASE