diff options
author | Dave Parks <davep@lindenlab.com> | 2012-02-28 16:10:04 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-02-28 16:10:04 -0600 |
commit | 353907bac61e6db0aca16e7e43f13f627b414dca (patch) | |
tree | bdec476d198931fad2d0f27782187e5f2a0c2fdb /indra | |
parent | 124c5c3864dab85c20010bad9ae7ff9fb0ce26ca (diff) |
SH-2908 Fix for incompatibility issue with GLSL 1.30
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llrender/llshadermgr.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index b28a97adaa..7d384450e6 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -640,11 +640,15 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade //backwards compatibility with legacy texture lookup syntax text[count++] = strdup("#define texture2D texture\n"); - text[count++] = strdup("#define texture2DRect texture\n"); text[count++] = strdup("#define textureCube texture\n"); text[count++] = strdup("#define texture2DLod textureLod\n"); text[count++] = strdup("#define shadow2D(a,b) vec2(texture(a,b))\n"); - text[count++] = strdup("#define shadow2DRect(a,b) vec2(texture(a,b))\n"); + + if (major_version > 1 || minor_version >= 40) + { //GLSL 1.40 replaces texture2DRect et al with texture + text[count++] = strdup("#define texture2DRect texture\n"); + text[count++] = strdup("#define shadow2DRect(a,b) vec2(texture(a,b))\n"); + } } //copy preprocessor definitions into buffer |