From d2dd614996452f653d8a2710b55b9b3799350688 Mon Sep 17 00:00:00 2001 From: dhewg Date: Sat, 5 Mar 2011 18:38:00 +0100 Subject: ANDROID: Clear screen on initSize() --- backends/platform/android/gfx.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'backends/platform/android') diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index 1b7679d0e5..d6dc71fcfb 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -266,6 +266,11 @@ void OSystem_Android::initSize(uint width, uint height, // setMouseCursor however, so just take a guess at the desired // size (it's small). _mouse_texture_palette->allocBuffer(20, 20); + + // clear screen + GLCALL(glClearColorx(0, 0, 0, 1 << 16)); + GLCALL(glClear(GL_COLOR_BUFFER_BIT)); + JNI::swapBuffers(); } int OSystem_Android::getScreenChangeID() const { @@ -529,9 +534,6 @@ void OSystem_Android::copyRectToOverlay(const OverlayColor *buf, int pitch, GLTHREADCHECK; - const Graphics::Surface *surface = _overlay_texture->surface_const(); - assert(surface->bytesPerPixel == sizeof(buf[0])); - // This 'pitch' is pixels not bytes _overlay_texture->updateBuffer(x, y, w, h, buf, pitch * sizeof(buf[0])); -- cgit v1.2.3