[Scummvm-git-logs] scummvm master -> e27c553a054b9cbc1b9df2bd86de4a2d3cd1b5ff
neuromancer
noreply at scummvm.org
Tue Jul 11 11:40:24 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e27c553a05 FREESCAPE: make sure the screen is clean before using glScissors
Commit: e27c553a054b9cbc1b9df2bd86de4a2d3cd1b5ff
https://github.com/scummvm/scummvm/commit/e27c553a054b9cbc1b9df2bd86de4a2d3cd1b5ff
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-07-11T13:41:09+02:00
Commit Message:
FREESCAPE: make sure the screen is clean before using glScissors
Changed paths:
engines/freescape/freescape.cpp
engines/freescape/gfx_opengl.cpp
diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index d030cf33de7..86b33f9db74 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -424,6 +424,7 @@ void FreescapeEngine::processInput() {
_gfx->setViewport(_fullscreenViewArea);
openMainMenuDialog();
_gfx->setViewport(_viewArea);
+ _gfx->computeScreenViewport();
_savedScreen->free();
delete _savedScreen;
break;
@@ -571,6 +572,7 @@ Common::Error FreescapeEngine::run() {
// Draw first frame
resetInput();
+ _gfx->computeScreenViewport();
drawFrame();
_gfx->flipBuffer();
g_system->updateScreen();
diff --git a/engines/freescape/gfx_opengl.cpp b/engines/freescape/gfx_opengl.cpp
index 2ec6dcfc289..54213885a32 100644
--- a/engines/freescape/gfx_opengl.cpp
+++ b/engines/freescape/gfx_opengl.cpp
@@ -312,8 +312,10 @@ void OpenGLRenderer::useColor(uint8 r, uint8 g, uint8 b) {
}
void OpenGLRenderer::clear(uint8 r, uint8 g, uint8 b) {
+ glDisable(GL_SCISSOR_TEST);
glClearColor(r / 255., g / 255., b / 255., 1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glEnable(GL_SCISSOR_TEST);
}
void OpenGLRenderer::drawFloor(uint8 color) {
More information about the Scummvm-git-logs
mailing list