ANDROID: Clear screen on initSize()

This commit is contained in:
dhewg 2011-03-05 18:38:00 +01:00
parent 94db3403a3
commit d2dd614996

View File

@ -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]));