[Scummvm-git-logs] scummvm master -> 5a4b27e1485442fbf47c962b3e63887118900f2f

aquadran aquadran at gmail.com
Tue Nov 9 16:31:20 UTC 2021


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:
5a4b27e148 STARK: Synchronise code with opengl renderer


Commit: 5a4b27e1485442fbf47c962b3e63887118900f2f
    https://github.com/scummvm/scummvm/commit/5a4b27e1485442fbf47c962b3e63887118900f2f
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2021-11-09T17:31:15+01:00

Commit Message:
STARK: Synchronise code with opengl renderer

Changed paths:
    engines/stark/gfx/tinygltexture.cpp


diff --git a/engines/stark/gfx/tinygltexture.cpp b/engines/stark/gfx/tinygltexture.cpp
index c1f6cc639f..fd877f22c9 100644
--- a/engines/stark/gfx/tinygltexture.cpp
+++ b/engines/stark/gfx/tinygltexture.cpp
@@ -40,9 +40,8 @@ TinyGlTexture::TinyGlTexture() :
 	tglTexParameteri(TGL_TEXTURE_2D, TGL_TEXTURE_MIN_FILTER, TGL_NEAREST);
 	tglTexParameteri(TGL_TEXTURE_2D, TGL_TEXTURE_MAG_FILTER, TGL_NEAREST);
 
-	// NOTE: TinyGL doesn't have issues with white lines so doesn't need use TGL_CLAMP_TO_EDGE
-	tglTexParameteri(TGL_TEXTURE_2D, TGL_TEXTURE_WRAP_S, TGL_REPEAT);
-	tglTexParameteri(TGL_TEXTURE_2D, TGL_TEXTURE_WRAP_T, TGL_REPEAT);
+	tglTexParameteri(TGL_TEXTURE_2D, TGL_TEXTURE_WRAP_S, TGL_CLAMP_TO_EDGE);
+	tglTexParameteri(TGL_TEXTURE_2D, TGL_TEXTURE_WRAP_T, TGL_CLAMP_TO_EDGE);
 }
 
 TinyGlTexture::~TinyGlTexture() {
@@ -98,6 +97,11 @@ void TinyGlTexture::setSamplingFilter(Texture::SamplingFilter filter) {
 
 void TinyGlTexture::setLevelCount(uint32 count) {
 	_levelCount = count;
+
+	if (count >= 1) {
+		tglTexParameteri(TGL_TEXTURE_2D, TGL_TEXTURE_WRAP_S, TGL_MIRRORED_REPEAT);
+		tglTexParameteri(TGL_TEXTURE_2D, TGL_TEXTURE_WRAP_T, TGL_MIRRORED_REPEAT);
+	}
 }
 
 void TinyGlTexture::addLevel(uint32 level, const Graphics::Surface *surface, const byte *palette) {




More information about the Scummvm-git-logs mailing list