[Scummvm-git-logs] scummvm master -> 66652cd36593f27a4eccce5cd767307b5b449155
aquadran
noreply at scummvm.org
Tue Jun 10 20:29:39 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:
66652cd365 WINTERMUTE: Add restore alpha test state for classic opengl renderer
Commit: 66652cd36593f27a4eccce5cd767307b5b449155
https://github.com/scummvm/scummvm/commit/66652cd36593f27a4eccce5cd767307b5b449155
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2025-06-10T22:29:35+02:00
Commit Message:
WINTERMUTE: Add restore alpha test state for classic opengl renderer
Changed paths:
engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
index 8f05d7d9ed8..3263ed31a41 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
@@ -126,10 +126,11 @@ bool BaseRenderOpenGL3D::flip() {
_lastTexture = nullptr;
// Store blend mode and cull face mode
- GLboolean stateBlend, cullState;
+ GLboolean stateBlend, stateCullFace, stateAlpha;
glGetBooleanv(GL_BLEND, &stateBlend);
- glGetBooleanv(GL_CULL_FACE, &cullState);
-
+ glGetBooleanv(GL_CULL_FACE, &stateCullFace);
+ glGetBooleanv(GL_ALPHA_TEST, &stateAlpha);
+
postfilter();
// Disable blend mode and cull face to prevent interfere with backend renderer
@@ -144,11 +145,16 @@ bool BaseRenderOpenGL3D::flip() {
else
glDisable(GL_BLEND);
- if (cullState)
+ if (stateCullFace)
glEnable(GL_CULL_FACE);
else
glDisable(GL_CULL_FACE);
+ if (stateAlpha)
+ glEnable(GL_ALPHA_TEST);
+ else
+ glDisable(GL_ALPHA_TEST);
+
_state = RSTATE_NONE;
return true;
}
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 b65707410d0..12f1602028f 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
@@ -210,9 +210,9 @@ bool BaseRenderOpenGL3DShader::flip() {
_lastTexture = nullptr;
// Store blend mode and cull face mode
- GLboolean stateBlend, cullState;
+ GLboolean stateBlend, stateCullFace;
glGetBooleanv(GL_BLEND, &stateBlend);
- glGetBooleanv(GL_CULL_FACE, &cullState);
+ glGetBooleanv(GL_CULL_FACE, &stateCullFace);
postfilter();
@@ -228,7 +228,7 @@ bool BaseRenderOpenGL3DShader::flip() {
else
glDisable(GL_BLEND);
- if (cullState)
+ if (stateCullFace)
glEnable(GL_CULL_FACE);
else
glDisable(GL_CULL_FACE);
More information about the Scummvm-git-logs
mailing list