summaryrefslogtreecommitdiff
path: root/src/resources/imagehelper.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-13 15:56:56 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-13 15:56:56 +0300
commitcd0baf3217701134a8e61932fd14c39cec0cf242 (patch)
tree7d18a8b58d753865c3de9027fd384035375c7ab9 /src/resources/imagehelper.h
parente71aed97c2d885c8113561c1e0cad91454adeb57 (diff)
downloadmv-cd0baf3217701134a8e61932fd14c39cec0cf242.tar.gz
mv-cd0baf3217701134a8e61932fd14c39cec0cf242.tar.bz2
mv-cd0baf3217701134a8e61932fd14c39cec0cf242.tar.xz
mv-cd0baf3217701134a8e61932fd14c39cec0cf242.zip
Fix compilation errors with different flags.
Also fix renderer selection in build without OpenGL.
Diffstat (limited to 'src/resources/imagehelper.h')
-rw-r--r--src/resources/imagehelper.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/resources/imagehelper.h b/src/resources/imagehelper.h
index b37d1e279..ed8f89323 100644
--- a/src/resources/imagehelper.h
+++ b/src/resources/imagehelper.h
@@ -72,8 +72,6 @@ class ImageHelper
virtual Image *createTextSurface(SDL_Surface *const tmpImage,
const int width, const int height,
float alpha) const A_WARN_UNUSED = 0;
-
- virtual RenderType useOpenGL() const A_WARN_UNUSED = 0;
#else
virtual Image *load(SDL_RWops *rw, Dye const &dye) const A_WARN_UNUSED
{ return nullptr; }
@@ -84,9 +82,6 @@ class ImageHelper
virtual Image *createTextSurface(SDL_Surface *const tmpImage,
const float alpha) const A_WARN_UNUSED
{ return nullptr; }
-
- virtual RenderType useOpenGL() const A_WARN_UNUSED
- { return RENDER_SOFTWARE; }
#endif
static SDL_Surface *convertTo32Bit(SDL_Surface *const tmpImage)
@@ -102,8 +97,15 @@ class ImageHelper
static SDL_Surface *loadPng(SDL_RWops *const rw);
+ static void setOpenGlMode(const RenderType useOpenGL)
+ { mUseOpenGL = useOpenGL; }
+
+ virtual RenderType useOpenGL() const A_WARN_UNUSED
+ { return mUseOpenGL; }
+
protected:
static bool mEnableAlpha;
+ static RenderType mUseOpenGL;
};
extern ImageHelper *imageHelper;