[Scummvm-git-logs] scummvm master -> 083ab320d5d2b378a1475359eb638cdcdaa89de4
aquadran
noreply at scummvm.org
Thu Nov 21 19:18:56 UTC 2024
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:
083ab320d5 WINTERMUTE: Turn off blending for 3d setup render mode
Commit: 083ab320d5d2b378a1475359eb638cdcdaa89de4
https://github.com/scummvm/scummvm/commit/083ab320d5d2b378a1475359eb638cdcdaa89de4
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2024-11-21T20:18:52+01:00
Commit Message:
WINTERMUTE: Turn off blending for 3d setup render mode
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 e4b64ffcc93..0506137742a 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
@@ -197,6 +197,11 @@ bool BaseRenderOpenGL3D::setup3D(Camera3D *camera, bool force) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
+ // Disable blending for 3d rendering, it seems no need to enable it.
+ // It will be enabled in other places when needed.
+ // This is delta compared to original sources.
+ glDisable(GL_BLEND);
+
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glEnable(GL_ALPHA_TEST);
@@ -898,6 +903,9 @@ void BaseRenderOpenGL3D::renderSceneGeometry(const BaseArray<AdWalkplane *> &pla
}
}
+ // This is delta compared to original sources.
+ glDisable(GL_BLEND);
+
glDisable(GL_COLOR_MATERIAL);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
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 74e1896a1bb..ddd8ec18259 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
@@ -191,6 +191,11 @@ bool BaseRenderOpenGL3DShader::setup3D(Camera3D *camera, bool force) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
+ // Disable blending for 3d rendering, it seems no need to enable it.
+ // It will be enabled in other places when needed.
+ // This is delta compared to original sources.
+ glDisable(GL_BLEND);
+
glEnable(GL_DEPTH_TEST);
// WME uses 8 as a reference value and Direct3D expects it to be in the range [0, 255]
_alphaRef = 8 / 255.0f;
More information about the Scummvm-git-logs
mailing list