3dphotoshoot

view src/opengl.c @ 27:3d082c566b53

fixed all the bugs, pc version works
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 18 Jun 2015 04:32:25 +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 }