diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/fboinfo.h | 5 | ||||
-rw-r--r-- | src/resources/image.h | 6 | ||||
-rw-r--r-- | src/resources/openglimagehelper.h | 11 | ||||
-rw-r--r-- | src/resources/subimage.h | 11 |
4 files changed, 26 insertions, 7 deletions
diff --git a/src/resources/fboinfo.h b/src/resources/fboinfo.h index 54415e697..dcc76d435 100644 --- a/src/resources/fboinfo.h +++ b/src/resources/fboinfo.h @@ -28,8 +28,13 @@ #include "resources/fboinfo.h" +#ifdef ANDROID +#include <GLES/gl.h> +#include <GLES/glext.h> +#else #include <SDL_opengl.h> #include <GL/glext.h> +#endif struct FBOInfo final { diff --git a/src/resources/image.h b/src/resources/image.h index 3752965bc..36404b2b1 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -37,10 +37,14 @@ * extensions anyway it's safe to just disable the SDL version. */ //#define NO_SDL_GLEXT -#define GL_GLEXT_PROTOTYPES 1 +#ifdef ANDROID +#include <GLES/gl.h> +#else +#define GL_GLEXT_PROTOTYPES 1 #include <SDL_opengl.h> #endif +#endif #include <map> diff --git a/src/resources/openglimagehelper.h b/src/resources/openglimagehelper.h index 02641f85f..b0428f58a 100644 --- a/src/resources/openglimagehelper.h +++ b/src/resources/openglimagehelper.h @@ -27,14 +27,25 @@ #include "main.h" #ifdef USE_OPENGL + +#ifndef GL_TEXTURE_RECTANGLE_ARB +#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 +#endif + #include "utils/stringvector.h" #include "resources/imagehelper.h" #include <SDL.h> +#ifdef ANDROID +#include <GLES/gl.h> +#define GL_RGBA8 GL_RGBA8_OES +#else #define GL_GLEXT_PROTOTYPES 1 #include <SDL_opengl.h> +#endif class Dye; class Image; diff --git a/src/resources/subimage.h b/src/resources/subimage.h index 47d8476cb..69e0debab 100644 --- a/src/resources/subimage.h +++ b/src/resources/subimage.h @@ -30,16 +30,15 @@ #ifdef USE_OPENGL -/* The definition of OpenGL extensions by SDL is giving problems with recent - * gl.h headers, since they also include these definitions. As we're not using - * extensions anyway it's safe to just disable the SDL version. - */ -//#define NO_SDL_GLEXT +#ifdef ANDROID +#include <GLES/gl.h> +#else #define GL_GLEXT_PROTOTYPES 1 - #include <SDL_opengl.h> #endif +#endif + #include "resources/image.h" /** |