summaryrefslogtreecommitdiff
path: root/indra/newview/llwaterparammanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llwaterparammanager.h')
-rw-r--r--indra/newview/llwaterparammanager.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/indra/newview/llwaterparammanager.h b/indra/newview/llwaterparammanager.h
index c479f1861c..3fe0f0d861 100644
--- a/indra/newview/llwaterparammanager.h
+++ b/indra/newview/llwaterparammanager.h
@@ -212,13 +212,10 @@ struct WaterExpFloatControl
/// WindLight parameter manager class - what controls all the wind light shaders
-class LLWaterParamManager
+class LLWaterParamManager : public LLSingleton<LLWaterParamManager>
{
public:
- LLWaterParamManager();
- ~LLWaterParamManager();
-
/// load a preset file
void loadAllPresets(const std::string & fileName);
@@ -238,12 +235,6 @@ public:
/// 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,9 +272,6 @@ public:
F32 getFogDensity(void);
LLColor4 getFogColor(void);
- // singleton pattern implementation
- static LLWaterParamManager * instance();
-
public:
LLWaterParamSet mCurParams;
@@ -311,11 +299,13 @@ public:
F32 mDensitySliderValue;
private:
+ friend class LLSingleton<LLWaterParamManager>;
+ /*virtual*/ void initSingleton();
+ LLWaterParamManager();
+ ~LLWaterParamManager();
+
LLVector4 mWaterPlane;
F32 mWaterFogKS;
-
- // our parameter manager singleton instance
- static LLWaterParamManager * sInstance;
};
inline void LLWaterParamManager::setDensitySliderValue(F32 val)