using a texture for the grid is better
[vrfileman] / src / opengl.h
1 #ifndef OPENGL_H_
2 #define OPENGL_H_
3
4 #ifdef HAVE_CONFIG_H_
5 #include "config.h"
6 #endif
7
8 #if defined(IPHONE) || defined(__IPHONE__)
9 #include <OpenGLES/ES2/gl.h>
10
11 #define glClearDepth    glClearDepthf
12 #define GLDEF
13 #include "sanegl.h"
14
15 #elif defined(ANDROID)
16 #include <GLES2/gl2.h>
17 #include <GLES2/gl2ext.h>
18 #define GLDEF
19 #include "sanegl.h"
20
21 #else
22
23 #include <GL/glew.h>
24
25 #ifdef __APPLE__
26 #include <GLUT/glut.h>
27 #else
28 #include <GL/glut.h>
29 #endif  /* __APPLE__ */
30
31 #endif  /* IPHONE */
32
33 #ifndef GL_RGB16F
34 #define GL_RGB16F       0x881b
35 #endif
36 #ifndef GL_RGBA16F
37 #define GL_RGBA16F      0x881a
38 #endif
39 #ifndef GL_RGB32F
40 #define GL_RGB32F       0x8815
41 #endif
42 #ifndef GL_RGBA32F
43 #define GL_RGBA32F      0x8814
44 #endif
45 #ifndef GL_LUMINANCE16F
46 #define GL_LUMINANCE16F 0x881e
47 #endif
48 #ifndef GL_LUMINANCE32F
49 #define GL_LUMINANCE32F 0x8818
50 #endif
51 #ifndef GL_DEPTH24_STENCIL8
52 #define GL_DEPTH24_STENCIL8     GL_DEPTH24_STENCIL8_OES
53 #endif
54
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58
59 int init_opengl(void);
60
61 #ifdef __cplusplus
62 }
63 #endif
64
65 #endif  /* OPENGL_H_ */