summaryrefslogtreecommitdiff
path: root/indra/newview/llwaterparammanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llwaterparammanager.cpp')
-rw-r--r--indra/newview/llwaterparammanager.cpp33
1 files changed, 5 insertions, 28 deletions
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index 7314894c2e..c984938303 100644
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -57,8 +57,6 @@
#include "curl/curl.h"
-LLWaterParamManager * LLWaterParamManager::sInstance = NULL;
-
LLWaterParamManager::LLWaterParamManager() :
mFogColor(22.f/255.f, 43.f/255.f, 54.f/255.f, 0.0f, 0.0f, "waterFogColor", "WaterFogColor"),
mFogDensity(4, "waterFogDensity", 2),
@@ -246,7 +244,7 @@ void LLWaterParamManager::updateShaderUniforms(LLGLSLShader * shader)
{
if (shader->mShaderGroup == LLGLSLShader::SG_WATER)
{
- shader->uniform4fv(LLViewerShaderMgr::LIGHTNORM, 1, LLWLParamManager::instance()->getRotatedLightDir().mV);
+ shader->uniform4fv(LLViewerShaderMgr::LIGHTNORM, 1, LLWLParamManager::getInstance()->getRotatedLightDir().mV);
shader->uniform3fv("camPosLocal", 1, LLViewerCamera::getInstance()->getOrigin().mV);
shader->uniform4fv("waterFogColor", 1, LLDrawPoolWater::sWaterFogColor.mV);
shader->uniform4fv("waterPlane", 1, mWaterPlane.mV);
@@ -320,19 +318,6 @@ void LLWaterParamManager::update(LLViewerCamera * cam)
}
}
-// static
-void LLWaterParamManager::initClass(void)
-{
- instance();
-}
-
-// static
-void LLWaterParamManager::cleanupClass(void)
-{
- delete sInstance;
- sInstance = NULL;
-}
-
bool LLWaterParamManager::addParamSet(const std::string& name, LLWaterParamSet& param)
{
// add a new one if not one there already
@@ -439,17 +424,9 @@ F32 LLWaterParamManager::getFogDensity(void)
return fogDensity;
}
-// static
-LLWaterParamManager * LLWaterParamManager::instance()
+// virtual static
+void LLWaterParamManager::initSingleton()
{
- if(NULL == sInstance)
- {
- sInstance = new LLWaterParamManager();
-
- sInstance->loadAllPresets(LLStringUtil::null);
-
- sInstance->getParamSet("Default", sInstance->mCurParams);
- }
-
- return sInstance;
+ loadAllPresets(LLStringUtil::null);
+ getParamSet("Default", mCurParams);
}