diff options
author | Dave Parks <davep@lindenlab.com> | 2011-05-24 15:30:30 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-05-24 15:30:30 -0500 |
commit | 0d5a661e57239c3e5d46a55cf4e2d808f31121fe (patch) | |
tree | a66313df0077f01de19b8c967486561656ad5af5 /indra/llrender/llshadermgr.cpp | |
parent | 79131e8a480ab3611ce739717ed84c6ad76aa234 (diff) | |
parent | 4353eeb9288c95b98935e60928ec0b80de4e6145 (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) ) |