summaryrefslogtreecommitdiff
path: root/src/render/mobileopenglgraphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/mobileopenglgraphics.cpp')
-rw-r--r--src/render/mobileopenglgraphics.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index d273e9f65..82bf04dc8 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -120,11 +120,14 @@ void MobileOpenGLGraphics::initArrays()
}
bool MobileOpenGLGraphics::setVideoMode(const int w, const int h,
- const int bpp, const bool fs,
- const bool hwaccel, const bool resize,
+ const int scale,
+ const int bpp,
+ const bool fs,
+ const bool hwaccel,
+ const bool resize,
const bool noFrame)
{
- setMainFlags(w, h, bpp, fs, hwaccel, resize, noFrame);
+ setMainFlags(w, h, scale, bpp, fs, hwaccel, resize, noFrame);
return setOpenGLMode();
}
@@ -842,10 +845,12 @@ void MobileOpenGLGraphics::_beginDraw()
#ifdef ANDROID
glOrthof(0.0, static_cast<float>(mRect.w),
- static_cast<float>(mRect.h), 0.0, -1.0, 1.0);
+ static_cast<float>(mRect.h),
+ 0.0, -1.0, 1.0);
#else
glOrtho(0.0, static_cast<double>(mRect.w),
- static_cast<double>(mRect.h), 0.0, -1.0, 1.0);
+ static_cast<double>(mRect.h),
+ 0.0, -1.0, 1.0);
#endif
glMatrixMode(GL_MODELVIEW);
@@ -969,9 +974,10 @@ bool MobileOpenGLGraphics::pushClipArea(gcn::Rectangle area)
glTranslatef(static_cast<GLfloat>(transX),
static_cast<GLfloat>(transY), 0);
}
- glScissor(clipArea.x, mRect.h - clipArea.y - clipArea.height,
- clipArea.width, clipArea.height);
-
+ glScissor(clipArea.x * mScale,
+ (mRect.h - clipArea.y - clipArea.height) * mScale,
+ clipArea.width * mScale,
+ clipArea.height * mScale);
return result;
}
@@ -997,8 +1003,10 @@ void MobileOpenGLGraphics::popClipArea()
glTranslatef(static_cast<GLfloat>(transX),
static_cast<GLfloat>(transY), 0);
}
- glScissor(clipArea.x, mRect.h - clipArea.y - clipArea.height,
- clipArea.width, clipArea.height);
+ glScissor(clipArea.x * mScale,
+ (mRect.h - clipArea.y - clipArea.height) * mScale,
+ clipArea.width * mScale,
+ clipArea.height * mScale);
}
#ifdef ANDROID