diff options
author | Graham Madarasz (Graham) <graham@lindenlab.com> | 2013-03-01 11:21:35 -0800 |
---|---|---|
committer | Graham Madarasz (Graham) <graham@lindenlab.com> | 2013-03-01 11:21:35 -0800 |
commit | dfda8826eb4654845430520dac48c011e058e1c0 (patch) | |
tree | 7ace15924b286393cc312f312bb632bc0d6eef86 /indra/newview/llwaterparamset.h | |
parent | ae1aa461ea3f96c092e2a50ae40f290b03b25356 (diff) |
Make WL updates use pre-hashed strings for uniform sets
Diffstat (limited to 'indra/newview/llwaterparamset.h')
-rw-r--r-- | indra/newview/llwaterparamset.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llwaterparamset.h b/indra/newview/llwaterparamset.h index b28585af59..368cb0ccba 100644 --- a/indra/newview/llwaterparamset.h +++ b/indra/newview/llwaterparamset.h @@ -33,6 +33,7 @@ #include "v4math.h" #include "v4color.h" #include "llviewershadermgr.h" +#include "llstringtable.h" class LLWaterParamSet; @@ -47,6 +48,9 @@ public: private: LLSD mParamValues; + std::vector<LLStaticHashedString> mParamHashedNames; + + void updateHashedNames(); public: @@ -140,6 +144,17 @@ inline void LLWaterParamSet::setAll(const LLSD& val) mParamValues[mIt->first] = mIt->second; } } + updateHashedNames(); +} + +inline void LLWaterParamSet::updateHashedNames() +{ + mParamHashedNames.clear(); + // Iterate through values + for(LLSD::map_iterator iter = mParamValues.beginMap(); iter != mParamValues.endMap(); ++iter) + { + mParamHashedNames.push_back(LLStaticHashedString(iter->first)); + } } inline const LLSD& LLWaterParamSet::getAll() |