From cd0baf3217701134a8e61932fd14c39cec0cf242 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 13 Sep 2013 15:56:56 +0300 Subject: Fix compilation errors with different flags. Also fix renderer selection in build without OpenGL. --- src/resources/imagehelper.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/resources/imagehelper.h') 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; -- cgit v1.2.3-60-g2f50