[Scummvm-git-logs] scummvm master -> 684bd8c7fb08bab77fbe53bbdedeca1dec27cba6
aquadran
noreply at scummvm.org
Thu Oct 2 12:32:48 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:
684bd8c7fb WINTERMUTE: Use color mask in rendering to stencil buffer
Commit: 684bd8c7fb08bab77fbe53bbdedeca1dec27cba6
https://github.com/scummvm/scummvm/commit/684bd8c7fb08bab77fbe53bbdedeca1dec27cba6
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2025-10-02T14:32:42+02:00
Commit Message:
WINTERMUTE: Use color mask in rendering to stencil buffer
Changed paths:
engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp
diff --git a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
index 2683af33d5a..2b0163b8468 100644
--- a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
+++ b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
@@ -65,6 +65,7 @@ bool ShadowVolumeOpenGL::renderToStencilBuffer() {
// Disable z-buffer writes (note: z-testing still occurs), and enable the
// stencil-buffer
glDepthMask(GL_FALSE);
+ glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
glDisable(GL_TEXTURE_2D);
glDisable(GL_LIGHTING);
glEnable(GL_STENCIL_TEST);
@@ -99,6 +100,7 @@ bool ShadowVolumeOpenGL::renderToStencilBuffer() {
glFrontFace(GL_CCW);
glShadeModel(GL_SMOOTH);
glDepthMask(GL_TRUE);
+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glDisable(GL_STENCIL_TEST);
glDisable(GL_BLEND);
diff --git a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
index b60a7b2b23f..8a7f7924294 100644
--- a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
@@ -98,6 +98,7 @@ bool ShadowVolumeOpenGLShader::renderToStencilBuffer() {
// Disable z-buffer writes (note: z-testing still occurs), and enable the
// stencil-buffer
glDepthMask(GL_FALSE);
+ glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
glDisable(GL_TEXTURE_2D);
glEnable(GL_STENCIL_TEST);
glEnable(GL_CULL_FACE);
@@ -128,6 +129,7 @@ bool ShadowVolumeOpenGLShader::renderToStencilBuffer() {
// Restore render states
glFrontFace(GL_CCW);
glDepthMask(GL_TRUE);
+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glDisable(GL_STENCIL_TEST);
glDisable(GL_BLEND);
diff --git a/engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp b/engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp
index f818572d3fb..19bad805978 100644
--- a/engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp
+++ b/engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp
@@ -63,6 +63,7 @@ bool ShadowVolumeTinyGL::renderToStencilBuffer() {
// Disable z-buffer writes (note: z-testing still occurs), and enable the
// stencil-buffer
tglDepthMask(TGL_FALSE);
+ tglColorMask(TGL_FALSE, TGL_FALSE, TGL_FALSE, TGL_FALSE);
tglDisable(TGL_TEXTURE_2D);
tglDisable(TGL_LIGHTING);
tglEnable(TGL_STENCIL_TEST);
@@ -97,6 +98,7 @@ bool ShadowVolumeTinyGL::renderToStencilBuffer() {
tglFrontFace(TGL_CCW);
tglShadeModel(TGL_SMOOTH);
tglDepthMask(TGL_TRUE);
+ tglColorMask(TGL_TRUE, TGL_TRUE, TGL_TRUE, TGL_TRUE);
tglDisable(TGL_STENCIL_TEST);
tglDisable(TGL_BLEND);
More information about the Scummvm-git-logs
mailing list