conworlds

annotate src/opengl.h @ 0:b326d53321f7

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 25 Apr 2014 05:20:53 +0300
parents
children c814f77d177e
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_ */