[Scummvm-git-logs] scummvm master -> 91a718c81de33a59d9d5faea2dc7e3b1f3924988
aquadran
noreply at scummvm.org
Sat Jul 25 17:11:30 UTC 2026
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:
91a718c81d WINTERMUTE: Make sure the same texture is bind
Commit: 91a718c81de33a59d9d5faea2dc7e3b1f3924988
https://github.com/scummvm/scummvm/commit/91a718c81de33a59d9d5faea2dc7e3b1f3924988
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2026-07-25T19:11:18+02:00
Commit Message:
WINTERMUTE: Make sure the same texture is bind
It fixes occasionally GFX glitches in 3D 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 c19510f4033..e57241f5340 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
@@ -411,7 +411,9 @@ bool BaseRenderOpenGL3D::drawSpriteEx(BaseSurface *tex, const Common::Rect32 &re
glDisable(GL_BLEND);
}
- if (_lastTexture != texture) {
+ GLint boundTexture;
+ glGetIntegerv(GL_TEXTURE_BINDING_2D, &boundTexture);
+ if (_lastTexture != texture || (GLuint)boundTexture != texture->getTextureName()) {
_lastTexture = texture;
glBindTexture(GL_TEXTURE_2D, texture->getTextureName());
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
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 dab71774ea6..70916a22190 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
@@ -517,7 +517,9 @@ bool BaseRenderOpenGL3DShader::drawSpriteEx(BaseSurface *tex, const Common::Rect
glDisable(GL_BLEND);
}
- if (_lastTexture != texture) {
+ GLint boundTexture;
+ glGetIntegerv(GL_TEXTURE_BINDING_2D, &boundTexture);
+ if (_lastTexture != texture || (GLuint)boundTexture != texture->getTextureName()) {
_lastTexture = texture;
glBindTexture(GL_TEXTURE_2D, texture->getTextureName());
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
More information about the Scummvm-git-logs
mailing list