oculus1

annotate src/opengl.h @ 27:9f783284a503

changed some FBO calls which I accidentally used the OpenGL 3.2 form instead of the more compatible one
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 26 Oct 2013 03:54:35 +0300
parents 3265970a7315
children
rev   line source
nuclear@8 1 #ifndef OPENGL_H_
nuclear@8 2 #define OPENGL_H_
nuclear@8 3
nuclear@9 4 #include <GL/glew.h>
nuclear@8 5
nuclear@9 6 #ifndef __APPLE__
nuclear@9 7 #include <GL/glut.h>
nuclear@8 8 #else
nuclear@8 9 #include <GLUT/glut.h>
nuclear@8 10 #endif
nuclear@8 11
nuclear@8 12 #define CHECKGLERR \
nuclear@8 13 do { \
nuclear@8 14 int err = glGetError(); \
nuclear@8 15 if(err) { \
nuclear@8 16 fprintf(stderr, "%s:%d: OpenGL error 0x%x: %s\n", __FILE__, __LINE__, err, strglerr(err)); \
nuclear@8 17 abort(); \
nuclear@8 18 } \
nuclear@8 19 } while(0)
nuclear@8 20
nuclear@9 21
nuclear@9 22 class Matrix4x4;
nuclear@9 23
nuclear@9 24 void load_matrix(const Matrix4x4 &m);
nuclear@9 25 void mult_matrix(const Matrix4x4 &m);
nuclear@8 26
nuclear@8 27 const char *strglerr(int err);
nuclear@8 28
nuclear@9 29 #endif /* OPENGL_H_ */