dungeon_crawler
annotate prototype/src/opengl.h @ 70:f55ddab0f3a4
"fixed" the disappearing lights issue
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 09 Oct 2012 02:54:01 +0300 |
parents | 8fb37db44fd8 |
children |
rev | line source |
---|---|
nuclear@1 | 1 #ifndef OPENGL_H_ |
nuclear@1 | 2 #define OPENGL_H_ |
nuclear@1 | 3 |
nuclear@1 | 4 #include <GL/glew.h> |
nuclear@1 | 5 |
nuclear@1 | 6 #ifndef __APPLE__ |
nuclear@1 | 7 #include <GL/glut.h> |
nuclear@1 | 8 #else |
nuclear@1 | 9 #include <GLUT/glut.h> |
nuclear@1 | 10 #endif |
nuclear@1 | 11 |
nuclear@18 | 12 #define CHECKGLERR \ |
nuclear@18 | 13 do { \ |
nuclear@18 | 14 int err = glGetError(); \ |
nuclear@18 | 15 if(err) { \ |
nuclear@18 | 16 fprintf(stderr, "%s:%d: OpenGL error 0x%x: %s\n", __FILE__, __LINE__, err, strglerr(err)); \ |
nuclear@18 | 17 abort(); \ |
nuclear@18 | 18 } \ |
nuclear@18 | 19 } while(0) |
nuclear@18 | 20 |
nuclear@18 | 21 |
nuclear@7 | 22 class Matrix4x4; |
nuclear@7 | 23 |
nuclear@7 | 24 void load_matrix(const Matrix4x4 &m); |
nuclear@7 | 25 void mult_matrix(const Matrix4x4 &m); |
nuclear@7 | 26 |
nuclear@18 | 27 const char *strglerr(int err); |
nuclear@18 | 28 |
nuclear@1 | 29 #endif /* OPENGL_H_ */ |