dungeon_crawler
diff prototype/src/opengl.h @ 18:5c41e6fcb300
- commandline arguments
- stereoscopic rendering
- FBO fixed
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 21 Aug 2012 03:17:48 +0300 |
parents | 8fb37db44fd8 |
children |
line diff
1.1 --- a/prototype/src/opengl.h Mon Aug 20 06:11:58 2012 +0300 1.2 +++ b/prototype/src/opengl.h Tue Aug 21 03:17:48 2012 +0300 1.3 @@ -9,9 +9,21 @@ 1.4 #include <GLUT/glut.h> 1.5 #endif 1.6 1.7 +#define CHECKGLERR \ 1.8 + do { \ 1.9 + int err = glGetError(); \ 1.10 + if(err) { \ 1.11 + fprintf(stderr, "%s:%d: OpenGL error 0x%x: %s\n", __FILE__, __LINE__, err, strglerr(err)); \ 1.12 + abort(); \ 1.13 + } \ 1.14 + } while(0) 1.15 + 1.16 + 1.17 class Matrix4x4; 1.18 1.19 void load_matrix(const Matrix4x4 &m); 1.20 void mult_matrix(const Matrix4x4 &m); 1.21 1.22 +const char *strglerr(int err); 1.23 + 1.24 #endif /* OPENGL_H_ */