From 2dc7df91ade45d8952473f7de5068e8705440e29 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 13 Dec 2011 15:23:55 -0600 Subject: SH-2743 Fix for shader compiler error on some GL 3.x implementations. --- indra/llrender/llshadermgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llrender/llshadermgr.cpp') diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index ac9dc9544d..85c4bab7a9 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -579,7 +579,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade text[count++] = strdup("#define ATTRIBUTE attribute\n"); text[count++] = strdup("#define VARYING varying\n"); } - else if (version < 3.f) + else if (version < 3.3f) { //set version to 1.20 text[count++] = strdup("#version 120\n"); -- cgit v1.2.3 From 9fa68f0da363cd3c20dbb079f5d2901a45dfea5f Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 14 Dec 2011 17:55:36 -0600 Subject: SH-2743 Fix for shader compiler error on some GL 3.x implementations. --- indra/llrender/llshadermgr.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'indra/llrender/llshadermgr.cpp') diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 85c4bab7a9..1a03aeebb7 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -107,10 +107,13 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) { return FALSE; } - - if (!shader->attachObject("lighting/sumLightsSpecularV.glsl")) + + if (!features->isAlphaLighting) { - return FALSE; + if (!shader->attachObject("lighting/sumLightsSpecularV.glsl")) + { + return FALSE; + } } if (!shader->attachObject("lighting/lightSpecularV.glsl")) @@ -125,9 +128,12 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) return FALSE; } - if (!shader->attachObject("lighting/sumLightsV.glsl")) + if (!features->isAlphaLighting) { - return FALSE; + if (!shader->attachObject("lighting/sumLightsV.glsl")) + { + return FALSE; + } } if (!shader->attachObject("lighting/lightV.glsl")) @@ -296,7 +302,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) } shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1); } - } + } } // NOTE order of shader object attaching is VERY IMPORTANT!!! -- cgit v1.2.3