oculus1
diff src/opengl.h @ 9:b66b54a68dfd
tracking almost done
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 19 Sep 2013 06:36:48 +0300 |
parents | 3265970a7315 |
children |
line diff
1.1 --- a/src/opengl.h Wed Sep 18 22:15:04 2013 +0300 1.2 +++ b/src/opengl.h Thu Sep 19 06:36:48 2013 +0300 1.3 @@ -1,58 +1,12 @@ 1.4 #ifndef OPENGL_H_ 1.5 #define OPENGL_H_ 1.6 1.7 -#include <stdlib.h> 1.8 +#include <GL/glew.h> 1.9 1.10 -#ifdef __APPLE__ 1.11 -#include "TargetConditionals.h" 1.12 - 1.13 -#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR 1.14 -/* iOS */ 1.15 -#include <OpenGLES/ES2/gl.h> 1.16 -#include <OpenGLES/ES2/glext.h> 1.17 - 1.18 -#define GL_CLAMP GL_CLAMP_TO_EDGE 1.19 -#define GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES 1.20 - 1.21 -#undef USE_OLDGL 1.22 - 1.23 -#define GL_WRITE_ONLY GL_WRITE_ONLY_OES 1.24 -#define glMapBuffer glMapBufferOES 1.25 -#define glUnmapBuffer glUnmapBufferOES 1.26 - 1.27 +#ifndef __APPLE__ 1.28 +#include <GL/glut.h> 1.29 #else 1.30 -/* MacOS X */ 1.31 -#include <GL/glew.h> 1.32 #include <GLUT/glut.h> 1.33 - 1.34 -#define USE_OLDGL 1.35 -#endif 1.36 - 1.37 -#else 1.38 -/* UNIX or Windows */ 1.39 -#include <GL/glew.h> 1.40 -#include <GL/glut.h> 1.41 - 1.42 -#define USE_OLDGL 1.43 -#endif 1.44 - 1.45 -#ifndef GL_RGB16F 1.46 -#define GL_RGB16F 0x881b 1.47 -#endif 1.48 -#ifndef GL_RGBA16F 1.49 -#define GL_RGBA16F 0x881a 1.50 -#endif 1.51 -#ifndef GL_RGB32F 1.52 -#define GL_RGB32F 0x8815 1.53 -#endif 1.54 -#ifndef GL_RGBA32F 1.55 -#define GL_RGBA32F 0x8814 1.56 -#endif 1.57 -#ifndef GL_LUMINANCE16F 1.58 -#define GL_LUMINANCE16F 0x881e 1.59 -#endif 1.60 -#ifndef GL_LUMINANCE32F 1.61 -#define GL_LUMINANCE32F 0x8818 1.62 #endif 1.63 1.64 #define CHECKGLERR \ 1.65 @@ -64,8 +18,12 @@ 1.66 } \ 1.67 } while(0) 1.68 1.69 -void init_opengl(); 1.70 + 1.71 +class Matrix4x4; 1.72 + 1.73 +void load_matrix(const Matrix4x4 &m); 1.74 +void mult_matrix(const Matrix4x4 &m); 1.75 1.76 const char *strglerr(int err); 1.77 1.78 -#endif // OPENGL_H_ 1.79 +#endif /* OPENGL_H_ */