diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-17 02:24:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-17 14:55:08 +0300 |
commit | 5a322df4da3102ae0c8d3bc3071386dc5f21e580 (patch) | |
tree | 4ca0cca3328baf7484074ad6e1cf9c5a9f9e3db0 /src/mgl.h | |
parent | e6e36b25a696212f0262e3e5ef520543b1b3a58b (diff) | |
download | plus-5a322df4da3102ae0c8d3bc3071386dc5f21e580.tar.gz plus-5a322df4da3102ae0c8d3bc3071386dc5f21e580.tar.bz2 plus-5a322df4da3102ae0c8d3bc3071386dc5f21e580.tar.xz plus-5a322df4da3102ae0c8d3bc3071386dc5f21e580.zip |
Add OpenGL support for Android builds (partially).
Diffstat (limited to 'src/mgl.h')
-rw-r--r-- | src/mgl.h | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -24,10 +24,15 @@ #include "main.h" #ifdef USE_OPENGL +#ifdef ANDROID +#include <GLES/gl.h> +#include <GLES/glext.h> +#define APIENTRY GL_APIENTRY +#else #define GL_GLEXT_PROTOTYPES 1 - #include <SDL_opengl.h> #include <GL/glext.h> +#endif #define GL_NUM_EXTENSIONS 0x821D #define GL_DEPTH_ATTACHMENT 0x8D00 @@ -35,6 +40,16 @@ #define GL_FRAMEBUFFER 0x8D40 #define GL_RENDERBUFFER 0x8D41 +#ifndef GL_COMPRESSED_RGBA_ARB +#define GL_COMPRESSED_RGBA_ARB 0x84EE +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 +#endif +#ifndef GL_MAX_ELEMENTS_VERTICES +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#endif + #define defNameE(name) extern name##_t m##name typedef void (APIENTRY *glGenRenderbuffers_t)(GLsizei, GLuint *); |