diff options
author | Dave Parks <davep@lindenlab.com> | 2011-05-25 15:53:45 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-05-25 15:53:45 -0500 |
commit | dbefd976ed137e04b7f43949b029ccb3db6a5399 (patch) | |
tree | f220831b20c6c2855ef75a84e1d2ecf0ee0ab709 /indra/llrender/llshadermgr.cpp | |
parent | 8e728befa57bcea0981179709dd5f13af1cd29a8 (diff) | |
parent | 9eea451a82379a61fa4a6cc2a55274e06cecbd58 (diff) |
merge
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r-- | indra/llrender/llshadermgr.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 98a0a93084..b8f9c60ca9 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -374,6 +374,12 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade GLcharARB* text[1024]; GLuint count = 0; + //copy preprocessor definitions into buffer + for (std::map<std::string,std::string>::iterator iter = mDefinitions.begin(); iter != mDefinitions.end(); ++iter) + { + std::string define = "#define " + iter->first + " " + iter->second + "\n"; + text[count++] = (GLcharARB *) strdup(define.c_str()); + } //copy file into memory while( fgets((char *)buff, 1024, file) != NULL && count < LL_ARRAY_SIZE(buff) ) |