3dphotoshoot
view src/opengl.c @ 19:94b8ef9b8caa
restored C++
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 10 Jun 2015 22:28:48 +0300 |
parents | |
children |
line source
1 #include "opengl.h"
3 static const char *errstr[] = {
4 "GL_INVALID_ENUM",
5 "GL_INVALID_VALUE",
6 "GL_INVALID_OPERATION",
7 "GL_STACK_OVERFLOW",
8 "GL_STACK_UNDERFLOW",
9 "GL_OUT_OF_MEMORY"
10 };
12 const char *glerrstr(int err)
13 {
14 if(!err) {
15 return "no error";
16 }
17 if(err < GL_INVALID_ENUM || err > GL_OUT_OF_MEMORY) {
18 return "unknown error";
19 }
20 return errstr[err - GL_INVALID_ENUM];
21 }