erebus

annotate src/opengl.h @ 15:20d6c05529f1

debugging the sphere problem
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 25 May 2014 02:00:07 +0300
parents
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@0 7 #include <GL/glut.h>
nuclear@0 8 #else
nuclear@0 9 #include <GLUT/glut.h>
nuclear@0 10 #endif
nuclear@0 11
nuclear@0 12 #define CHECKGLERR \
nuclear@0 13 do { \
nuclear@0 14 int err = glGetError(); \
nuclear@0 15 if(err) { \
nuclear@0 16 fprintf(stderr, "%s:%d: OpenGL error 0x%x: %s\n", __FILE__, __LINE__, err, strglerr(err)); \
nuclear@0 17 abort(); \
nuclear@0 18 } \
nuclear@0 19 } while(0)
nuclear@0 20
nuclear@0 21
nuclear@0 22 class Matrix4x4;
nuclear@0 23
nuclear@0 24 void load_matrix(const Matrix4x4 &m);
nuclear@0 25 void mult_matrix(const Matrix4x4 &m);
nuclear@0 26
nuclear@0 27 const char *strglerr(int err);
nuclear@0 28
nuclear@0 29 #endif /* OPENGL_H_ */