diff options
author | dolphin <dolphin@lindenlab.com> | 2014-12-05 13:22:07 -0800 |
---|---|---|
committer | dolphin <dolphin@lindenlab.com> | 2014-12-05 13:22:07 -0800 |
commit | 62db156552c29f44e060b12c51c429db1a7f5788 (patch) | |
tree | 4033a3c8b4cde4b6941f3482d88e2db18bc809cf /indra/llrender/llshadermgr.cpp | |
parent | fb9e603e3498ec56a65e858c68347d218421afbc (diff) | |
parent | 6d48db868f7459fcf5f0e89d830a844e409d4163 (diff) |
merged with 3.7.22-release
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rwxr-xr-x | indra/llrender/llshadermgr.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 95a2c8b589..b2be3cc3b6 100755 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -73,7 +73,11 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) { llassert_always(shader != NULL); LLShaderFeatures *features = & shader->mFeatures; - + + if (features->attachNothing) + { + return TRUE; + } ////////////////////////////////////// // Attach Vertex Shader Features First ////////////////////////////////////// @@ -670,12 +674,17 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade if (defines) { for (boost::unordered_map<std::string,std::string>::iterator iter = defines->begin(); iter != defines->end(); ++iter) - { - std::string define = "#define " + iter->first + " " + iter->second + "\n"; - text[count++] = (GLcharARB *) strdup(define.c_str()); - } + { + std::string define = "#define " + iter->first + " " + iter->second + "\n"; + text[count++] = (GLcharARB *) strdup(define.c_str()); + } } + if( gGLManager.mIsATI ) + { + text[ count++ ] = strdup( "#define IS_AMD_CARD 1\n" ); + } + if (texture_index_channels > 0 && type == GL_FRAGMENT_SHADER_ARB) { //use specified number of texture channels for indexed texture rendering |