summaryrefslogtreecommitdiff
path: root/src/resources/image.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-01 17:40:11 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-01 17:57:47 +0300
commit5359b7c20b9ee93989a840e555f0a2102b7bb806 (patch)
treea95017d22a4f3e2f57be59dd4826f3b823a65656 /src/resources/image.cpp
parent222748a7e0c79225c66485898b913aa60f56cfe2 (diff)
downloadmanaverse-5359b7c20b9ee93989a840e555f0a2102b7bb806.tar.gz
manaverse-5359b7c20b9ee93989a840e555f0a2102b7bb806.tar.bz2
manaverse-5359b7c20b9ee93989a840e555f0a2102b7bb806.tar.xz
manaverse-5359b7c20b9ee93989a840e555f0a2102b7bb806.zip
add SDL2 default render mode.
in this mode SDL using own driver with hardware acceleration.
Diffstat (limited to 'src/resources/image.cpp')
-rw-r--r--src/resources/image.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 3d5d58620..c289c90cd 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -413,7 +413,9 @@ Image *Image::getSubImage(const int x, const int y,
{
// Create a new clipped sub-image
#ifdef USE_OPENGL
- if (OpenGLImageHelper::mUseOpenGL != RENDER_SOFTWARE)
+ const RenderType mode = OpenGLImageHelper::mUseOpenGL;
+ if (mode == RENDER_NORMAL_OPENGL || mode == RENDER_SAFE_OPENGL
+ || mode == RENDER_GLES_OPENGL)
{
return new SubImage(this, mGLImage, x, y, width, height,
mTexWidth, mTexHeight);