static 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(); gBumpImageList.restoreGL(); // Changing shader also changes the terrain detail to high, reflect that change here if (newvalue.asBoolean()) { // shaders enabled, set terrain detail to high gSavedSettings.setS32("RenderTerrainDetail", 1); } // else, leave terrain detail as is LLViewerShaderMgr::instance()->setShaders(); return true; }