diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 78b37705a7..901cbacdb6 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -152,7 +152,10 @@ static bool handleTerrainDetailChanged(const LLSD& newvalue) } -static bool handleSetShaderChanged(const LLSD& newvalue) +// Expose handleSetShaderChanged() +//static bool handleSetShaderChanged(const LLSD& newvalue) +bool handleSetShaderChanged(const LLSD& newvalue) +// { // changing shader level may invalidate existing cached bump maps, as the shader type determines the format of the bump map it expects - clear and repopulate the bump cache gBumpImageList.destroyGL(); diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h index d7191f5c8d..646e44c250 100644 --- a/indra/newview/llviewercontrol.h +++ b/indra/newview/llviewercontrol.h @@ -47,6 +47,9 @@ void settings_setup_listeners(); // for the graphics settings void create_graphics_group(LLControlGroup& group); +// Expose handleSetShaderChanged() +bool handleSetShaderChanged(const LLSD& newvalue); + // saved at end of session extern LLControlGroup gSavedSettings; extern LLControlGroup gSavedPerAccountSettings; diff --git a/indra/newview/quickprefs.cpp b/indra/newview/quickprefs.cpp index d564c87aa7..819f2c88c7 100644 --- a/indra/newview/quickprefs.cpp +++ b/indra/newview/quickprefs.cpp @@ -73,22 +73,11 @@ FloaterQuickPrefs::QuickPrefsXMLEntry::QuickPrefsXMLEntry() {} // -// Ansariel: Copied from llviewercontrol.cpp, handleSetShaderChanged() -static void handleShaderChanged() -{ - // changing shader level may invalidate existing cached bump maps, as the shader type determines the format of the bump map it expects - clear and repopulate the bump cache - gBumpImageList.destroyGL(); - gBumpImageList.restoreGL(); - - // else, leave terrain detail as is - LLViewerShaderMgr::instance()->setShaders(); -} - FloaterQuickPrefs::FloaterQuickPrefs(const LLSD& key) : LLTransientDockableFloater(NULL, true, key) { // For Phototools - mCommitCallbackRegistrar.add("Quickprefs.ShaderChanged", boost::bind(&handleShaderChanged)); + mCommitCallbackRegistrar.add("Quickprefs.ShaderChanged", boost::bind(&handleSetShaderChanged, LLSD())); } FloaterQuickPrefs::~FloaterQuickPrefs()