erebus

view src/opengl.h @ 31:53a98c148bf8

- introduced SurfaceGeometry to carry all the geometric information input to BRDF sampling and evaluation functions. - made Reflectance keep an (optional) pointer to its material - simplified PhongRefl::sample_dir, with the help of SurfaceGeometry - worked around microsoft's broken std::thread implementation's deadlock on join
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 07 Jun 2014 09:14:17 +0300
parents
children
line source
1 #ifndef OPENGL_H_
2 #define OPENGL_H_
4 #include <GL/glew.h>
6 #ifndef __APPLE__
7 #include <GL/glut.h>
8 #else
9 #include <GLUT/glut.h>
10 #endif
12 #define CHECKGLERR \
13 do { \
14 int err = glGetError(); \
15 if(err) { \
16 fprintf(stderr, "%s:%d: OpenGL error 0x%x: %s\n", __FILE__, __LINE__, err, strglerr(err)); \
17 abort(); \
18 } \
19 } while(0)
22 class Matrix4x4;
24 void load_matrix(const Matrix4x4 &m);
25 void mult_matrix(const Matrix4x4 &m);
27 const char *strglerr(int err);
29 #endif /* OPENGL_H_ */