From 07cfa2abd50ca161a793ee797f4e87e2bad6c8c0 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 22 Jul 2014 23:05:40 +0200 Subject: [PATCH] Set texture unit indices for GLSL ES --- extern/shiny/Main/MaterialInstance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/shiny/Main/MaterialInstance.cpp b/extern/shiny/Main/MaterialInstance.cpp index b8032d681..128cc593b 100644 --- a/extern/shiny/Main/MaterialInstance.cpp +++ b/extern/shiny/Main/MaterialInstance.cpp @@ -163,7 +163,7 @@ namespace sh mTexUnits.push_back(texUnit); // set texture unit indices (required by GLSL) - if (useShaders && ((hasVertex && foundVertex) || (hasFragment && foundFragment)) && mFactory->getCurrentLanguage () == Language_GLSL) + if (useShaders && ((hasVertex && foundVertex) || (hasFragment && foundFragment)) && (mFactory->getCurrentLanguage () == Language_GLSL || mFactory->getCurrentLanguage() == Language_GLSLES)) { pass->setTextureUnitIndex (foundVertex ? GPT_Vertex : GPT_Fragment, texIt->getName(), i);