3dphotoshoot
view src/opengl.c @ 20:c14613d27a3a
writing a C++ shader class for this
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 11 Jun 2015 02:53:43 +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 }