diff options
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index c7fce83b03..18b7a48d7b 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1029,26 +1029,28 @@ void LLFloaterPreference::refreshEnabledState() //Deferred/SSAO/Shadows LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders"); - if (LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseFBO") && - LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && - shaders) - { - BOOL enabled = (ctrl_wind_light->get()) ? TRUE : FALSE; + + BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && + shaders && + gGLManager.mHasFramebufferObject && + gSavedSettings.getBOOL("RenderAvatarVP") && + (ctrl_wind_light->get()) ? TRUE : FALSE; - ctrl_deferred->setEnabled(enabled); + ctrl_deferred->setEnabled(enabled); - LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO"); - LLComboBox* ctrl_shadow = getChild<LLComboBox>("ShadowDetail"); + LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO"); + LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF"); + LLComboBox* ctrl_shadow = getChild<LLComboBox>("ShadowDetail"); - enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO") && (ctrl_deferred->get() ? TRUE : FALSE); + enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO") && (ctrl_deferred->get() ? TRUE : FALSE); - ctrl_ssao->setEnabled(enabled); + ctrl_ssao->setEnabled(enabled); + ctrl_dof->setEnabled(enabled); - enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail"); - - ctrl_shadow->setEnabled(enabled); - } + enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail"); + ctrl_shadow->setEnabled(enabled); + // now turn off any features that are unavailable disableUnavailableSettings(); @@ -1067,6 +1069,7 @@ void LLFloaterPreference::disableUnavailableSettings() LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders"); LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail"); LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO"); + LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF"); // if vertex shaders off, disable all shader related products if(!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable")) @@ -1092,6 +1095,9 @@ void LLFloaterPreference::disableUnavailableSettings() ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); + ctrl_dof->setEnabled(FALSE); + ctrl_dof->setValue(FALSE); + ctrl_deferred->setEnabled(FALSE); ctrl_deferred->setValue(FALSE); } @@ -1109,12 +1115,16 @@ void LLFloaterPreference::disableUnavailableSettings() ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); + ctrl_dof->setEnabled(FALSE); + ctrl_dof->setValue(FALSE); + ctrl_deferred->setEnabled(FALSE); ctrl_deferred->setValue(FALSE); } // disabled deferred - if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred")) + if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") || + !gGLManager.mHasFramebufferObject) { ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); @@ -1122,6 +1132,9 @@ void LLFloaterPreference::disableUnavailableSettings() ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); + ctrl_dof->setEnabled(FALSE); + ctrl_dof->setValue(FALSE); + ctrl_deferred->setEnabled(FALSE); ctrl_deferred->setValue(FALSE); } @@ -1163,6 +1176,9 @@ void LLFloaterPreference::disableUnavailableSettings() ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); + ctrl_dof->setEnabled(FALSE); + ctrl_dof->setValue(FALSE); + ctrl_deferred->setEnabled(FALSE); ctrl_deferred->setValue(FALSE); } |