diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-10-20 18:56:43 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-10-20 18:56:43 -0500 |
| commit | 492f820c6b8a164cb201fed232e40e743e8e38c4 (patch) | |
| tree | 7d360ddc2ff2288d1ec8163b6215cf9c81031b51 /indra/newview/llwlparamset.cpp | |
| parent | 1c58b3b18ea732e0032e70ae6dc9c8ec2f2834b4 (diff) | |
| parent | 34c01b6b1ff758463dcdff19782e5af668699304 (diff) | |
merge
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(); } } } |
