From c911efb953a600092a6213c088d5b94fcf7779d3 Mon Sep 17 00:00:00 2001 From: Jonathan Goodman <geenz@geenzo.com> Date: Wed, 29 Aug 2012 03:41:26 -0400 Subject: [PATCH] Just pass in an empty preprocessor definition map from now on. The shader compiler won't add new #defines if it's empty. --- indra/llrender/llshadermgr.cpp | 7 ++----- indra/newview/llviewershadermgr.cpp | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index d15584d2e19..4f7f845c70b 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -660,11 +660,8 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade for (std::map<std::string,std::string>::iterator iter = defines.begin(); iter != defines.end(); ++iter) { - if (iter->first != "NULL") - { - 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 (texture_index_channels > 0 && type == GL_FRAGMENT_SHADER_ARB) diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 8c0ec4e2757..e70bf013e7d 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -828,7 +828,6 @@ BOOL LLViewerShaderMgr::loadBasicShaders() shaders.push_back( make_pair( "objects/nonindexedTextureV.glsl", 1 ) ); std::map<std::string, std::string> attribs; - attribs["NULL"] = "0"; // We no longer have to bind the shaders to global glhandles, they are automatically added to a map now. for (U32 i = 0; i < shaders.size(); i++) -- GitLab