[Scummvm-git-logs] scummvm master -> 0007b28368c80bda2cf01ddfe7a4d4743703319f
aquadran
noreply at scummvm.org
Thu Oct 2 12:10:02 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:
0007b28368 WINTERMUTE: Cleanup in shadow volume
Commit: 0007b28368c80bda2cf01ddfe7a4d4743703319f
https://github.com/scummvm/scummvm/commit/0007b28368c80bda2cf01ddfe7a4d4743703319f
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2025-10-02T14:09:55+02:00
Commit Message:
WINTERMUTE: Cleanup in shadow volume
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 30074038b44..2683af33d5a 100644
--- a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
+++ b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
@@ -74,7 +74,7 @@ bool ShadowVolumeOpenGL::renderToStencilBuffer() {
// Stencil test passes if ((ref & mask) cmpfn (stencil & mask)) is true.
// Note: since we set up the stencil-test to always pass, the STENCILFAIL
// renderstate is really not needed.
- glStencilFunc(GL_ALWAYS, 0x1, 0xFFFFFFFF);
+ glStencilFunc(GL_ALWAYS, 0x1, (GLuint)~0);
glShadeModel(GL_FLAT);
// Make sure that no pixels get drawn to the frame buffer
@@ -115,7 +115,7 @@ bool ShadowVolumeOpenGL::renderToScene() {
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
// Only write where stencil val >= 1 (count indicates # of shadows that overlap that pixel)
- glStencilFunc(GL_LEQUAL, 0x1, 0xFFFFFFFF);
+ glStencilFunc(GL_LEQUAL, 0x1, (GLuint)~0);
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
glDisable(GL_FOG);
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 0c906a43648..b60a7b2b23f 100644
--- a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
@@ -106,7 +106,7 @@ bool ShadowVolumeOpenGLShader::renderToStencilBuffer() {
// Stencil test passes if ((ref & mask) cmpfn (stencil & mask)) is true.
// Note: since we set up the stencil-test to always pass, the STENCILFAIL
// renderstate is really not needed.
- glStencilFunc(GL_ALWAYS, 0x1, 0xFFFFFFFF);
+ glStencilFunc(GL_ALWAYS, 0x1, (GLuint)~0);
// Make sure that no pixels get drawn to the frame buffer
glEnable(GL_BLEND);
@@ -144,7 +144,7 @@ bool ShadowVolumeOpenGLShader::renderToScene() {
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
// Only write where stencil val >= 1 (count indicates # of shadows that overlap that pixel)
- glStencilFunc(GL_LEQUAL, 0x1, 0xFFFFFFFF);
+ glStencilFunc(GL_LEQUAL, 0x1, (GLuint)~0);
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
glBindTexture(GL_TEXTURE_2D, 0);
diff --git a/engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp b/engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp
index 51d2a7ea85f..f818572d3fb 100644
--- a/engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp
+++ b/engines/wintermute/base/gfx/tinygl/shadow_volume_tinygl.cpp
@@ -72,7 +72,7 @@ bool ShadowVolumeTinyGL::renderToStencilBuffer() {
// Stencil test passes if ((ref & mask) cmpfn (stencil & mask)) is true.
// Note: since we set up the stencil-test to always pass, the STENCILFAIL
// renderstate is really not needed.
- tglStencilFunc(TGL_ALWAYS, 0x1, 0xFFFFFFFF);
+ tglStencilFunc(TGL_ALWAYS, 0x1, (TGLuint)~0);
tglShadeModel(TGL_FLAT);
// Make sure that no pixels get drawn to the frame buffer
@@ -113,7 +113,7 @@ bool ShadowVolumeTinyGL::renderToScene() {
tglBlendFunc(TGL_SRC_ALPHA, TGL_ONE_MINUS_SRC_ALPHA);
// Only write where stencil val >= 1 (count indicates # of shadows that overlap that pixel)
- tglStencilFunc(TGL_LEQUAL, 0x1, 0xFFFFFFFF);
+ tglStencilFunc(TGL_LEQUAL, 0x1, (TGLuint)~0);
tglStencilOp(TGL_KEEP, TGL_KEEP, TGL_KEEP);
tglDisable(TGL_FOG);
More information about the Scummvm-git-logs
mailing list