diff options
Diffstat (limited to 'loadgl.c.in')
-rw-r--r-- | loadgl.c.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/loadgl.c.in b/loadgl.c.in index a76eebc..1959b64 100644 --- a/loadgl.c.in +++ b/loadgl.c.in @@ -46,3 +46,19 @@ const char *lgl_strerror(enum lgl_status status) } return "Unknown"; } + +const char *gl_strerror(GLenum error) +{ + switch (error) { + case GL_NO_ERROR: return "No error"; + case GL_INVALID_ENUM: return "Invalid enumeration"; + case GL_INVALID_VALUE: return "Invalid value"; + case GL_INVALID_OPERATION: return "Invalid operation"; + case GL_STACK_OVERFLOW: return "Stack overflow"; + case GL_STACK_UNDERFLOW: return "Stack underflow"; + case GL_OUT_OF_MEMORY: return "Out of memory"; + case GL_INVALID_FRAMEBUFFER_OPERATION: return "Invalid framebuffer operation"; + case GL_CONTEXT_LOST: return "Context lost"; + } + return "Unknown"; +} |