labyrinth

view src/opengl.h @ 3:45b91185b298

android port
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 01 May 2015 04:36:50 +0300
parents 8ba79034e8a6
children
line source
1 #ifndef OPENGL_H_
2 #define OPENGL_H_
4 #ifdef __ANDROID__
5 #include <GLES/gl.h>
6 #include <GLES/glext.h>
7 #include <EGL/egl.h>
9 #define GL_MOBILE
11 #else
13 #include <GL/glew.h>
15 #define GL_DESKTOP
17 #endif /* not __ANDROID__ */
19 /* some helpers */
21 void set_light_position(int idx, float x, float y, float z);
22 void set_light_color(int idx, float r, float g, float b);
23 void set_light_attenuation(int idx, float constant, float linear, float quad);
25 void set_mtl_diffuse(float r, float g, float b, float a);
26 void set_mtl_specular(float r, float g, float b);
27 void set_mtl_shininess(float shin);
28 void set_mtl_emission(float r, float g, float b);
30 #ifdef GL_MOBILE
31 #define GLDEF
32 #include "sanegl.h"
33 #endif
35 #endif /* OPENGL_H_ */