conworlds
view src/opengl.h @ 22:5f53272ff612
removed the vr wrapper and added an external dependency to libgoatvr
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 29 Aug 2014 07:44:26 +0300 |
parents | b326d53321f7 |
children |
line source
1 #ifndef OPENGL_H_
2 #define OPENGL_H_
4 #include <GL/glew.h>
6 #ifndef __APPLE__
8 #ifdef WIN32
9 #include <windows.h>
10 #endif
12 #include <GL/gl.h>
13 #else
14 #include <OpenGL/gl.h>
15 #endif
17 #define CHECKGLERR \
18 do { \
19 int err = glGetError(); \
20 if(err) { \
21 fprintf(stderr, "%s:%d: OpenGL error 0x%x: %s\n", __FILE__, __LINE__, err, strglerr(err)); \
22 abort(); \
23 } \
24 } while(0)
27 class Matrix4x4;
29 void load_matrix(const Matrix4x4 &m);
30 void mult_matrix(const Matrix4x4 &m);
32 const char *strglerr(int err);
34 #endif /* OPENGL_H_ */