conworlds
annotate 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 |
rev | line source |
---|---|
nuclear@0 | 1 #ifndef OPENGL_H_ |
nuclear@0 | 2 #define OPENGL_H_ |
nuclear@0 | 3 |
nuclear@0 | 4 #include <GL/glew.h> |
nuclear@0 | 5 |
nuclear@0 | 6 #ifndef __APPLE__ |
nuclear@17 | 7 |
nuclear@17 | 8 #ifdef WIN32 |
nuclear@17 | 9 #include <windows.h> |
nuclear@17 | 10 #endif |
nuclear@17 | 11 |
nuclear@17 | 12 #include <GL/gl.h> |
nuclear@0 | 13 #else |
nuclear@17 | 14 #include <OpenGL/gl.h> |
nuclear@0 | 15 #endif |
nuclear@0 | 16 |
nuclear@0 | 17 #define CHECKGLERR \ |
nuclear@0 | 18 do { \ |
nuclear@0 | 19 int err = glGetError(); \ |
nuclear@0 | 20 if(err) { \ |
nuclear@0 | 21 fprintf(stderr, "%s:%d: OpenGL error 0x%x: %s\n", __FILE__, __LINE__, err, strglerr(err)); \ |
nuclear@0 | 22 abort(); \ |
nuclear@0 | 23 } \ |
nuclear@0 | 24 } while(0) |
nuclear@0 | 25 |
nuclear@0 | 26 |
nuclear@0 | 27 class Matrix4x4; |
nuclear@0 | 28 |
nuclear@0 | 29 void load_matrix(const Matrix4x4 &m); |
nuclear@0 | 30 void mult_matrix(const Matrix4x4 &m); |
nuclear@0 | 31 |
nuclear@0 | 32 const char *strglerr(int err); |
nuclear@0 | 33 |
nuclear@0 | 34 #endif /* OPENGL_H_ */ |