aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/android/gfx.cpp
diff options
context:
space:
mode:
authordhewg2011-03-13 22:08:19 +0100
committerdhewg2011-03-13 23:30:15 +0100
commit4267011e3a42b3f633f86e3df6af12c456aa0f60 (patch)
treea90dc78e2b603a1577d3d46dab64423af106e018 /backends/platform/android/gfx.cpp
parent3964ce81233c3e76b90cd8363781ac2a0558ed12 (diff)
downloadscummvm-rg350-4267011e3a42b3f633f86e3df6af12c456aa0f60.tar.gz
scummvm-rg350-4267011e3a42b3f633f86e3df6af12c456aa0f60.tar.bz2
scummvm-rg350-4267011e3a42b3f633f86e3df6af12c456aa0f60.zip
ANDROID: Some texture convinience functions
Diffstat (limited to 'backends/platform/android/gfx.cpp')
-rw-r--r--backends/platform/android/gfx.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index 34981dddb8..2543ac7a3e 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -250,6 +250,8 @@ void OSystem_Android::initOverlay() {
LOGI("overlay size is %ux%u", overlay_width, overlay_height);
_overlay_texture->allocBuffer(overlay_width, overlay_height);
+ _overlay_texture->setDrawRect(0, 0,
+ _egl_surface_width, _egl_surface_height);
}
void OSystem_Android::initSize(uint width, uint height,
@@ -264,6 +266,9 @@ void OSystem_Android::initSize(uint width, uint height,
_game_texture->allocBuffer(width, height);
_game_texture->fillBuffer(0);
#endif
+
+ _game_texture->setDrawRect(0, 0, _egl_surface_width, _egl_surface_height);
+
// Don't know mouse size yet - it gets reallocated in
// setMouseCursor. We need the palette allocated before
// setMouseCursor however, so just take a guess at the desired
@@ -364,8 +369,7 @@ void OSystem_Android::updateScreen() {
}
if (_focus_rect.isEmpty()) {
- _game_texture->drawTexture(0, 0, _egl_surface_width,
- _egl_surface_height);
+ _game_texture->drawTextureRect();
} else {
GLCALL(glPushMatrix());
GLCALL(glScalex(xdiv(_egl_surface_width, _focus_rect.width()),
@@ -377,8 +381,7 @@ void OSystem_Android::updateScreen() {
xdiv(_game_texture->height(), _egl_surface_height),
1 << 16));
- _game_texture->drawTexture(0, 0, _egl_surface_width,
- _egl_surface_height);
+ _game_texture->drawTextureRect();
GLCALL(glPopMatrix());
}
@@ -388,8 +391,7 @@ void OSystem_Android::updateScreen() {
// ugly, but the modern theme sets a wacko factor, only god knows why
cs = 1;
- GLCALL(_overlay_texture->drawTexture(0, 0, _egl_surface_width,
- _egl_surface_height));
+ GLCALL(_overlay_texture->drawTextureRect());
}
if (_show_mouse) {
@@ -422,7 +424,7 @@ void OSystem_Android::updateScreen() {
GLCALL(glScalex(cs << 16, cs << 16, 1 << 16));
- _mouse_texture->drawTexture();
+ _mouse_texture->drawTextureOrigin();
GLCALL(glPopMatrix());
}