From 82d1feb93300196f2baea717d27bb3c92a39f3c7 Mon Sep 17 00:00:00 2001 From: numzero Date: Mon, 13 Mar 2023 18:17:47 +0300 Subject: [PATCH] Accommodate lack of ETS_TEXTURE_1 --- source/Irrlicht/OpenGL/FixedPipelineRenderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Irrlicht/OpenGL/FixedPipelineRenderer.cpp b/source/Irrlicht/OpenGL/FixedPipelineRenderer.cpp index 4a20f020..bcf99ac6 100644 --- a/source/Irrlicht/OpenGL/FixedPipelineRenderer.cpp +++ b/source/Irrlicht/OpenGL/FixedPipelineRenderer.cpp @@ -174,7 +174,7 @@ void COpenGL3MaterialSolid2CB::OnSetConstants(IMaterialRendererServices* service core::matrix4 Matrix = driver->getTransform(ETS_TEXTURE_0); services->setPixelShaderConstant(TMatrix0ID, Matrix.pointer(), 16); - Matrix = driver->getTransform(ETS_TEXTURE_1); + Matrix = driver->getTransform(E_TRANSFORMATION_STATE(ETS_TEXTURE_0 + 1)); services->setPixelShaderConstant(TMatrix1ID, Matrix.pointer(), 16); services->setPixelShaderConstant(TextureUsage0ID, &TextureUsage0, 1); @@ -221,7 +221,7 @@ void COpenGL3MaterialLightmapCB::OnSetConstants(IMaterialRendererServices* servi core::matrix4 Matrix = driver->getTransform(ETS_TEXTURE_0); services->setPixelShaderConstant(TMatrix0ID, Matrix.pointer(), 16); - Matrix = driver->getTransform(ETS_TEXTURE_1); + Matrix = driver->getTransform(E_TRANSFORMATION_STATE(ETS_TEXTURE_0 + 1)); services->setPixelShaderConstant(TMatrix1ID, Matrix.pointer(), 16); services->setPixelShaderConstant(ModulateID, &Modulate, 1);