[Scummvm-git-logs] scummvm master -> 0d050c256dc4db5da7f62c7c840c3acdcfae3837
bluegr
noreply at scummvm.org
Sat May 31 08:31:27 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:
0d050c256d STARK: Check for GL_MIRRORED_REPEAT before using it
Commit: 0d050c256dc4db5da7f62c7c840c3acdcfae3837
https://github.com/scummvm/scummvm/commit/0d050c256dc4db5da7f62c7c840c3acdcfae3837
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2025-05-31T11:31:25+03:00
Commit Message:
STARK: Check for GL_MIRRORED_REPEAT before using it
Changed paths:
engines/stark/gfx/opengltexture.cpp
graphics/opengl/system_headers.h
graphics/opengl/texture.cpp
diff --git a/engines/stark/gfx/opengltexture.cpp b/engines/stark/gfx/opengltexture.cpp
index ab097324923..81a96cf1ed1 100644
--- a/engines/stark/gfx/opengltexture.cpp
+++ b/engines/stark/gfx/opengltexture.cpp
@@ -83,8 +83,11 @@ void OpenGlTexture::setLevelCount(uint32 count) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
}
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT);
+ // TODO: Provide a fallback if this isn't available.
+ if (OpenGLContext.textureMirrorRepeatSupported) {
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT);
+ }
}
}
diff --git a/graphics/opengl/system_headers.h b/graphics/opengl/system_headers.h
index 1f94cb657b9..31799488385 100644
--- a/graphics/opengl/system_headers.h
+++ b/graphics/opengl/system_headers.h
@@ -115,6 +115,10 @@
#define GL_CLAMP_TO_BORDER 0x812D
#endif
+#if !defined(GL_MIRRORED_REPEAT)
+ #define GL_MIRRORED_REPEAT 0x8370
+#endif
+
#if !defined(GL_DRAW_FRAMEBUFFER_BINDING)
#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
#endif
diff --git a/graphics/opengl/texture.cpp b/graphics/opengl/texture.cpp
index 2bc0500c5aa..fd0b28023c5 100644
--- a/graphics/opengl/texture.cpp
+++ b/graphics/opengl/texture.cpp
@@ -84,12 +84,10 @@ void Texture::setWrapMode(WrapMode wrapMode) {
break;
}
case kWrapModeMirroredRepeat:
-#if !USE_FORCED_GLES
if (OpenGLContext.textureMirrorRepeatSupported) {
glwrapMode = GL_MIRRORED_REPEAT;
break;
}
-#endif
// fall through
case kWrapModeRepeat:
default:
More information about the Scummvm-git-logs
mailing list