diff options
author | Dave Parks <davep@lindenlab.com> | 2011-04-22 11:50:19 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-04-22 11:50:19 -0500 |
commit | 764412f9b5e8d69950f9866a60299b1b458339c6 (patch) | |
tree | 7e9d634faddd40edf8ed715e7b479d1336ed7697 /indra/newview/llfloaterpreference.cpp | |
parent | b15dca22637b0b2c1947b758a93f51163fb48cf1 (diff) | |
parent | 0349d1f29197ca00c9eb7278d97bd56ea4d2050a (diff) |
merge
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 b4b12024aa..dd95782161 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1026,26 +1026,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(); @@ -1064,6 +1066,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")) @@ -1089,6 +1092,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); } @@ -1106,12 +1112,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); @@ -1119,6 +1129,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); } @@ -1160,6 +1173,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); } |