diff options
author | Matthew Hoops | 2011-08-26 22:44:17 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-08-26 22:44:17 -0400 |
commit | 4a69dc13d92e82fff85dc5a3a923b74ced259ffa (patch) | |
tree | 8945cd3745fd65f28b043caf7b1beddbbce2b2a1 /backends/graphics/opengl/gltexture.h | |
parent | ad293b249e74dd1cfbdbd721d02145efbdaf9eca (diff) | |
parent | 5e174cbfe466dbbe8e5470b0a00de1481b986181 (diff) | |
download | scummvm-rg350-4a69dc13d92e82fff85dc5a3a923b74ced259ffa.tar.gz scummvm-rg350-4a69dc13d92e82fff85dc5a3a923b74ced259ffa.tar.bz2 scummvm-rg350-4a69dc13d92e82fff85dc5a3a923b74ced259ffa.zip |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'backends/graphics/opengl/gltexture.h')
-rw-r--r-- | backends/graphics/opengl/gltexture.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/backends/graphics/opengl/gltexture.h b/backends/graphics/opengl/gltexture.h index f0cd7aed56..71f1eeb78f 100644 --- a/backends/graphics/opengl/gltexture.h +++ b/backends/graphics/opengl/gltexture.h @@ -20,6 +20,9 @@ * */ +#ifndef BACKENDS_GRAPHICS_OPENGL_GLTEXTURE_H +#define BACKENDS_GRAPHICS_OPENGL_GLTEXTURE_H + #include "common/scummsys.h" #ifdef WIN32 @@ -31,7 +34,20 @@ #undef ARRAYSIZE #endif -#if defined(USE_GLES) +// HACK: At this point in Windows platforms, common/util.h has been included +// via common/rect.h (from backends/graphics/sdl/sdl-graphics.h), via +// backends/graphics/openglsdl/openglsdl-graphics.h. Thus, we end up with +// COMMON_UTIL_H defined, and ARRAYSIZE undefined (bad!). Therefore, +// ARRAYSIZE is undefined in openglsdl-graphics.cpp. This is a temporary +// hackish solution fo fix compilation under Windows. +#if !defined(ARRAYSIZE) && defined(COMMON_UTIL_H) +#define ARRAYSIZE(x) ((int)(sizeof(x) / sizeof(x[0]))) +#endif + +#if defined(BADA) +#include <FGraphicsOpengl.h> +using namespace Osp::Graphics::Opengl; +#elif defined(USE_GLES) #include <GLES/gl.h> #elif defined(SDL_BACKEND) #include <SDL_opengl.h> @@ -106,3 +122,5 @@ protected: GLint _filter; bool _refresh; }; + +#endif |