Windlight/water parameter managers now derived from standard LLSingleton instead of using some silly redundant clone.

This commit is contained in:
Shyotl
2011-09-02 06:35:53 -05:00
parent 91cb401324
commit 443d4e9f56
31 changed files with 418 additions and 390 deletions

View File

@@ -122,17 +122,14 @@ struct WLFloatControl {
};
/// WindLight parameter manager class - what controls all the wind light shaders
class LLWLParamManager
class LLWLParamManager : public LLSingleton<LLWLParamManager>
{
public:
LOG_CLASS(LLWLParamManager);
LLWLParamManager();
~LLWLParamManager();
public:
void updateShaderLinks();
/// load a preset file
void loadPresets(const std::string & fileName);
/// save the preset file
void savePresets(const std::string & fileName);
@@ -195,8 +192,8 @@ public:
/// returns true if successful
bool removeParamSet(const std::string& name, bool delete_from_disk);
// singleton pattern implementation
static LLWLParamManager * instance();
/// @return all named windlight presets.
const std::map<std::string, LLWLParamSet>& getPresets() const { return mParamList; }
public:
@@ -251,14 +248,22 @@ public:
F32 mDomeOffset;
F32 mDomeRadius;
// list of all the parameters, listed by name
std::map<std::string, LLWLParamSet> mParamList;
private:
/// load a preset file
friend class LLWLAnimator;
void loadPresets(const std::string & fileName);
friend class LLSingleton<LLWLParamManager>;
/*virtual*/ void initSingleton();
LLWLParamManager();
~LLWLParamManager();
// list of all the parameters, listed by name
std::map<std::string, LLWLParamSet> mParamList;
std::vector<LLGLSLShader *> mShaderList;
// our parameter manager singleton instance
static LLWLParamManager * sInstance;
};