diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-02-08 01:39:56 +0200 |
---|---|---|
committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-02-08 01:39:56 +0200 |
commit | e1661fdcda074cfc9ef465c2c8cc729e9b894815 (patch) | |
tree | 16ed97c8628c0c4647782e6c06876df9730732b9 | |
parent | d6002da559bac486524491d72589ae03a947922e (diff) |
SL-19160 Enable ALM ctrl when Atmospheric shaders are used
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.h | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 9476a0f6a3..9ea49e935f 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -317,6 +317,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2)); gSavedSettings.getControl("AppearanceCameraMovement")->getCommitSignal()->connect(boost::bind(&handleAppearanceCameraMovementChanged, _2)); + gSavedSettings.getControl("WindLightUseAtmosShaders")->getCommitSignal()->connect(boost::bind(&LLFloaterPreference::onAtmosShaderChange, this)); LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this ); @@ -1729,6 +1730,22 @@ void LLFloaterPreference::onClickActionChange() updateClickActionControls(); } +void LLFloaterPreference::onAtmosShaderChange() +{ + LLCheckBoxCtrl* ctrl_alm = getChild<LLCheckBoxCtrl>("UseLightShaders"); + if(ctrl_alm) + { + //Deferred/SSAO/Shadows + BOOL bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && gSavedSettings.getBOOL("RenderObjectBump"); + BOOL shaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders"); + BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && + bumpshiny && + shaders; + + ctrl_alm->setEnabled(enabled); + } +} + void LLFloaterPreference::onClickPermsDefault() { LLFloaterReg::showInstance("perms_default"); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 2aa6ca87b7..6b23c4d4cd 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -139,6 +139,8 @@ protected: // updates click/double-click action keybindngs depending on view values void updateClickActionControls(); + void onAtmosShaderChange(); + public: // This function squirrels away the current values of the controls so that // cancel() can restore them. |