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.h28
1 files changed, 6 insertions, 22 deletions
diff --git a/indra/newview/llwaterparammanager.h b/indra/newview/llwaterparammanager.h
index f465034c39..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,12 +272,6 @@ public:
F32 getFogDensity(void);
LLColor4 getFogColor(void);
- // singleton pattern implementation
- static LLWaterParamManager * instance();
-
-private:
- void initOverrides();
-
public:
LLWaterParamSet mCurParams;
@@ -314,14 +299,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)