diff options
| author | Todd Stinson <stinson@lindenlab.com> | 2011-12-13 11:15:18 -0800 |
|---|---|---|
| committer | Todd Stinson <stinson@lindenlab.com> | 2011-12-13 11:15:18 -0800 |
| commit | 9d1db4f19ae7ca044e47d0fe4e605e14882351c5 (patch) | |
| tree | 2d499d53b60b2486f1e6666f8b9fe2063f984d22 /indra/newview/llwlparamset.cpp | |
| parent | 817c97c2f836948f210599a6f67e36a411b22c21 (diff) | |
| parent | dbc91a7fac9513bdd879c5c2dc82208e08eaad2d (diff) | |
Pull and merge from https://bitbucket.org/lindenlab/viewer-development.
Diffstat (limited to 'indra/newview/llwlparamset.cpp')
| -rw-r--r-- | indra/newview/llwlparamset.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp index 02d914a812..5bb7025031 100644 --- a/indra/newview/llwlparamset.cpp +++ b/indra/newview/llwlparamset.cpp @@ -69,12 +69,18 @@ LLWLParamSet::LLWLParamSet(void) : */ } +static LLFastTimer::DeclareTimer FTM_WL_PARAM_UPDATE("WL Param Update"); + void LLWLParamSet::update(LLGLSLShader * shader) const { + LLFastTimer t(FTM_WL_PARAM_UPDATE); + for(LLSD::map_const_iterator i = mParamValues.beginMap(); i != mParamValues.endMap(); ++i) { + + const std::string& param = i->first; if( param == "star_brightness" || param == "preset_num" || param == "sun_angle" || @@ -91,8 +97,9 @@ void LLWLParamSet::update(LLGLSLShader * shader) const val.mV[1] = F32(i->second[1].asReal()) + mCloudScrollYOffset; val.mV[2] = (F32) i->second[2].asReal(); val.mV[3] = (F32) i->second[3].asReal(); - - shader->uniform4fv(param, 1, val.mV); + stop_glerror(); + shader->uniform4fv(param, 1, val.mV); + stop_glerror(); } else // param is the uniform name { @@ -118,8 +125,9 @@ void LLWLParamSet::update(LLGLSLShader * shader) const { val.mV[0] = i->second.asBoolean(); } - + stop_glerror(); shader->uniform4fv(param, 1, val.mV); + stop_glerror(); } } } |
