summaryrefslogtreecommitdiff
path: root/src/resources/imagehelper.h
diff options
context:
space:
mode:
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;