diff options
Diffstat (limited to 'indra/newview/llwaterparammanager.h')
-rw-r--r-- | indra/newview/llwaterparammanager.h | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/indra/newview/llwaterparammanager.h b/indra/newview/llwaterparammanager.h index f465034c39..fcf1f8e23d 100644 --- a/indra/newview/llwaterparammanager.h +++ b/indra/newview/llwaterparammanager.h @@ -212,13 +212,11 @@ struct WaterExpFloatControl /// WindLight parameter manager class - what controls all the wind light shaders -class LLWaterParamManager +class LLWaterParamManager : public LLSingleton<LLWaterParamManager> { + LOG_CLASS(LLWaterParamManager); public: - LLWaterParamManager(); - ~LLWaterParamManager(); - /// load a preset file void loadAllPresets(const std::string & fileName); @@ -232,18 +230,15 @@ public: /// send the parameters to the shaders void propagateParameters(void); + /// apply user water preferences + void applyUserPrefs(bool interpolate); + /// update information for the shader void update(LLViewerCamera * cam); /// Update shader uniforms that have changed. void updateShaderUniforms(LLGLSLShader * shader); - /// Perform global initialization for this class. - static void initClass(void); - - // Cleanup of global data that's only inited once per class. - static void cleanupClass(); - /// add a param to the list bool addParamSet(const std::string& name, LLWaterParamSet& param); @@ -281,12 +276,6 @@ public: F32 getFogDensity(void); LLColor4 getFogColor(void); - // singleton pattern implementation - static LLWaterParamManager * instance(); - -private: - void initOverrides(); - public: LLWaterParamSet mCurParams; @@ -314,14 +303,13 @@ public: F32 mDensitySliderValue; private: + friend class LLSingleton<LLWaterParamManager>; + /*virtual*/ void initSingleton(); + LLWaterParamManager(); + ~LLWaterParamManager(); + LLVector4 mWaterPlane; F32 mWaterFogKS; - - LLColor4 mPrevFogColor; - F32 mPrevFogDensity; - - // our parameter manager singleton instance - static LLWaterParamManager * sInstance; }; inline void LLWaterParamManager::setDensitySliderValue(F32 val) |