mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
GRAPHICS3D: Clear screen while hiding overlay
This commit is contained in:
1 parent
eae8491722
commit
0ea1b5aef6
2 files changed
+23
No files matched your search
@@ -470,6 +470,17 @@ void iOSGraphics3dManager::hideOverlay() {
|
||||
|
||||
delete _overlayBackground;
|
||||
_overlayBackground = nullptr;
|
||||
|
||||
if (_surfaceRenderer) {
|
||||
_surfaceRenderer->prepareState();
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
_surfaceRenderer->restorePreviousState();
|
||||
updateScreen();
|
||||
_surfaceRenderer->prepareState();
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
_surfaceRenderer->restorePreviousState();
|
||||
updateScreen();
|
||||
}
|
||||
}
|
||||
|
||||
bool iOSGraphics3dManager::showMouse(bool visible) {
|
||||
|
||||
@@ -714,6 +714,18 @@ void OpenGLSdlGraphics3dManager::hideOverlay() {
|
||||
|
||||
delete _overlayBackground;
|
||||
_overlayBackground = nullptr;
|
||||
|
||||
if (_surfaceRenderer) {
|
||||
// If there is double buffering we need to redraw twice
|
||||
_surfaceRenderer->prepareState();
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
_surfaceRenderer->restorePreviousState();
|
||||
updateScreen();
|
||||
_surfaceRenderer->prepareState();
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
_surfaceRenderer->restorePreviousState();
|
||||
updateScreen();
|
||||
}
|
||||
}
|
||||
|
||||
void OpenGLSdlGraphics3dManager::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) {
|
||||
|
||||
Reference in new issue
Block a user