20 lines
434 B
C++
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
|