3dphotoshoot

view src/opengl.h @ 18:dccbd7d65517

moved to android-19 to make it work with android 4.x
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 10 Jun 2015 18:53:28 +0300
parents c71c477521ca
children
line source
1 #ifndef OPENGL_H_
2 #define OPENGL_H_
5 #ifdef ANDROID
6 #include <GLES2/gl2.h>
7 #include <GLES2/gl2ext.h>
8 #else
9 #include <GL/glew.h>
10 #endif
12 #define CHECK_GLERROR \
13 do { \
14 int err = glGetError(); \
15 if(err) { \
16 fprintf(stderr, "%s:%d: OpenGL error %d: %s\n", __FILE__, __LINE__, err, glerrstr(err)); \
17 abort(); \
18 } \
19 } while(0)
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
25 const char *glerrstr(int err);
27 #ifdef __cplusplus
28 }
29 #endif
32 #endif /* OPENGL_H_ */