aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhewg2011-03-14 20:10:41 +0100
committerdhewg2011-03-14 20:10:41 +0100
commitf706b1568d286bb2c145046e4d3f04f6ee177314 (patch)
treefb66ebb7e086fbaa39c364ee3d504fba1041679a
parentd060b597c38d6332ae4eb79d051427a2381bfc5c (diff)
downloadscummvm-rg350-f706b1568d286bb2c145046e4d3f04f6ee177314.tar.gz
scummvm-rg350-f706b1568d286bb2c145046e4d3f04f6ee177314.tar.bz2
scummvm-rg350-f706b1568d286bb2c145046e4d3f04f6ee177314.zip
ANDROID: Cleanup
Removed not required checks since we now buffer texture contents
-rw-r--r--backends/platform/android/texture.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index 87a8c2e362..691c384a18 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -103,22 +103,15 @@ GLESBaseTexture::~GLESBaseTexture() {
void GLESBaseTexture::release() {
LOGD("Destroying texture %u", _texture_name);
+
GLCALL(glDeleteTextures(1, &_texture_name));
+ _texture_name = 0;
}
void GLESBaseTexture::reinit() {
GLCALL(glGenTextures(1, &_texture_name));
- if (hasPalette()) {
- // paletted textures are in a local buffer, don't wipe it
- initSize();
- } else {
- // bypass allocBuffer() shortcut to reinit the texture properly
- _texture_width = 0;
- _texture_height = 0;
-
- allocBuffer(_surface.w, _surface.h);
- }
+ initSize();
setDirty();
}
@@ -154,8 +147,7 @@ void GLESBaseTexture::allocBuffer(GLuint w, GLuint h) {
_surface.h = h;
_surface.bytesPerPixel = _pixelFormat.bytesPerPixel;
- // Already allocated a sufficiently large buffer?
- if (w <= _texture_width && h <= _texture_height)
+ if (w == _texture_width && h == _texture_height)
return;
if (npot_supported) {