[Scummvm-git-logs] scummvm master -> 948923c62c288f0ef5eb981445d01d98122940b3

aquadran noreply at scummvm.org
Sun Dec 5 09:36:14 UTC 2021


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:
948923c62c GRAPHICS3D: Move viewport change to save/restore surface, framebuffer


Commit: 948923c62c288f0ef5eb981445d01d98122940b3
    https://github.com/scummvm/scummvm/commit/948923c62c288f0ef5eb981445d01d98122940b3
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2021-12-05T10:36:10+01:00

Commit Message:
GRAPHICS3D: Move viewport change to save/restore surface, framebuffer

Changed paths:
    backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp


diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
index 4c4353d97c..26d0254428 100644
--- a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
+++ b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
@@ -532,11 +532,11 @@ bool OpenGLSdlGraphics3dManager::isVSyncEnabled() const {
 }
 
 void OpenGLSdlGraphics3dManager::drawOverlay() {
+	_surfaceRenderer->prepareState();
+
 	glViewport(0, 0, _overlayScreen->getWidth(), _overlayScreen->getHeight());
 	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
 
-	_surfaceRenderer->prepareState();
-
 	if (_overlayBackground) {
 		_overlayBackground->draw(_surfaceRenderer);
 	}
@@ -564,9 +564,9 @@ OpenGL::FrameBuffer *OpenGLSdlGraphics3dManager::createFramebuffer(uint width, u
 void OpenGLSdlGraphics3dManager::updateScreen() {
 	if (_frameBuffer) {
 		_frameBuffer->detach();
+		_surfaceRenderer->prepareState();
 		glViewport(0, 0, _overlayScreen->getWidth(), _overlayScreen->getHeight());
 		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
-		_surfaceRenderer->prepareState();
 		_surfaceRenderer->render(_frameBuffer, _gameRect);
 		_surfaceRenderer->restorePreviousState();
 	}




More information about the Scummvm-git-logs mailing list