3dphotoshoot

annotate 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
rev   line source
nuclear@0 1 #ifndef OPENGL_H_
nuclear@0 2 #define OPENGL_H_
nuclear@0 3
nuclear@10 4
nuclear@10 5 #ifdef ANDROID
nuclear@10 6 #include <GLES2/gl2.h>
nuclear@10 7 #include <GLES2/gl2ext.h>
nuclear@10 8 #else
nuclear@10 9 #include <GL/glew.h>
nuclear@10 10 #endif
nuclear@0 11
nuclear@11 12 #define CHECK_GLERROR \
nuclear@11 13 do { \
nuclear@11 14 int err = glGetError(); \
nuclear@11 15 if(err) { \
nuclear@11 16 fprintf(stderr, "%s:%d: OpenGL error %d: %s\n", __FILE__, __LINE__, err, glerrstr(err)); \
nuclear@11 17 abort(); \
nuclear@11 18 } \
nuclear@11 19 } while(0)
nuclear@11 20
nuclear@11 21 #ifdef __cplusplus
nuclear@11 22 extern "C" {
nuclear@11 23 #endif
nuclear@11 24
nuclear@11 25 const char *glerrstr(int err);
nuclear@11 26
nuclear@11 27 #ifdef __cplusplus
nuclear@11 28 }
nuclear@11 29 #endif
nuclear@11 30
nuclear@11 31
nuclear@0 32 #endif /* OPENGL_H_ */