[Scummvm-git-logs] scummvm master -> a3a2537f60d0c9622c840b88d3bdff0750c1ef8a

aquadran noreply at scummvm.org
Sat May 24 15:11:25 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
a3a2537f60 WINTERMUTE: Improve masking shadow scene rendering


Commit: a3a2537f60d0c9622c840b88d3bdff0750c1ef8a
    https://github.com/scummvm/scummvm/commit/a3a2537f60d0c9622c840b88d3bdff0750c1ef8a
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2025-05-24T17:11:21+02:00

Commit Message:
WINTERMUTE: Improve masking shadow scene rendering

Changed paths:
    engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
    engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
    engines/wintermute/base/gfx/opengl/mesh3ds_opengl.cpp


diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
index a9e8c19651b..039df29abbe 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
@@ -866,6 +866,7 @@ void BaseRenderOpenGL3D::renderShadowGeometry(const BaseArray<AdWalkplane *> &pl
 	// disable color write
 	setSpriteBlendMode(Graphics::BLEND_UNKNOWN);
 	glBlendFunc(GL_ZERO, GL_ONE);
+	glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
 
 	// no texture
 	_lastTexture = nullptr;
@@ -896,6 +897,7 @@ void BaseRenderOpenGL3D::renderShadowGeometry(const BaseArray<AdWalkplane *> &pl
 	}
 
 	setSpriteBlendMode(Graphics::BLEND_NORMAL);
+	glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
 }
 
 // implements D3D SetRenderState() D3DRS_CULLMODE - CCW
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
index 71042f7ae07..bb7b0766efe 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
@@ -956,6 +956,7 @@ void BaseRenderOpenGL3DShader::renderShadowGeometry(const BaseArray<AdWalkplane
 	// disable color write
 	setSpriteBlendMode(Graphics::BLEND_UNKNOWN);
 	glBlendFunc(GL_ZERO, GL_ONE);
+	glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
 
 	// no texture
 	_lastTexture = nullptr;
@@ -986,6 +987,7 @@ void BaseRenderOpenGL3DShader::renderShadowGeometry(const BaseArray<AdWalkplane
 	}
 
 	setSpriteBlendMode(Graphics::BLEND_NORMAL);
+	glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
 }
 
 // implements D3D SetRenderState() D3DRS_CULLMODE - CCW
diff --git a/engines/wintermute/base/gfx/opengl/mesh3ds_opengl.cpp b/engines/wintermute/base/gfx/opengl/mesh3ds_opengl.cpp
index c00a452299a..86955d142af 100644
--- a/engines/wintermute/base/gfx/opengl/mesh3ds_opengl.cpp
+++ b/engines/wintermute/base/gfx/opengl/mesh3ds_opengl.cpp
@@ -49,8 +49,7 @@ void Mesh3DSOpenGL::render(bool color) {
 	glEnableClientState(GL_VERTEX_ARRAY);
 	glEnableClientState(GL_COLOR_ARRAY);
 	glVertexPointer(3, GL_FLOAT, sizeof(Mesh3DSVertex), &_vertexData[0]._x);
-	if (color)
-		glColorPointer(4, GL_FLOAT, sizeof(Mesh3DSVertex), &_vertexData[0]._r);
+	glColorPointer(4, GL_FLOAT, sizeof(Mesh3DSVertex), &_vertexData[0]._r);
 	glDrawArrays(GL_TRIANGLES, 0, _vertexCount);
 	glDisableClientState(GL_COLOR_ARRAY);
 	glDisableClientState(GL_VERTEX_ARRAY);




More information about the Scummvm-git-logs mailing list