From 6779cb7254cf6d08652a49ac1e5be23cd5131f8a Mon Sep 17 00:00:00 2001 From: sfan5 Date: Fri, 19 Nov 2021 19:27:47 +0100 Subject: [PATCH] Unconditionally load first texture matrix in OpenGL driver This used to work in Irrlicht 1.8 and I tried to figure out why it no longer did, but failed. fixes minetest/minetest#11206 --- source/Irrlicht/COpenGLDriver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Irrlicht/COpenGLDriver.cpp b/source/Irrlicht/COpenGLDriver.cpp index 454f0e30..5315232d 100644 --- a/source/Irrlicht/COpenGLDriver.cpp +++ b/source/Irrlicht/COpenGLDriver.cpp @@ -2730,7 +2730,8 @@ void COpenGLDriver::setTextureRenderStates(const SMaterial& material, bool reset { CacheHandler->setActiveTexture(GL_TEXTURE0 + i); - if (fixedPipeline) + // Minetest uses the first texture matrix even with the programmable pipeline + if (fixedPipeline || i == 0) { const bool isRTT = tmpTexture->isRenderTarget();