summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-05-04 10:25:26 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-05-04 10:25:26 +0100
commit399942954687bfa7836a021b7d6087c3c264f9d0 (patch)
tree67855100285cd92ff7c17c36bd6258ea17e7580a /indra/newview
parentf13b30848bb224695e9708ab61742c6d86d29935 (diff)
EXT-7168
Fix the tying of the deferred prefs UI to the featuretable.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterpreference.cpp35
-rw-r--r--indra/newview/llviewershadermgr.cpp3
-rw-r--r--indra/newview/pipeline.cpp9
3 files changed, 40 insertions, 7 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 00292eecb4..de92b953fb 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -862,18 +862,22 @@ 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 = (ctrl_wind_light->get()) ? TRUE : FALSE;
ctrl_deferred->setEnabled(enabled);
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
LLComboBox* ctrl_shadow = getChild<LLComboBox>("ShadowDetail");
- enabled = enabled && (ctrl_deferred->get() ? TRUE : FALSE);
+ enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO") && (ctrl_deferred->get() ? TRUE : FALSE);
ctrl_ssao->setEnabled(enabled);
+
+ enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail");
+
ctrl_shadow->setEnabled(enabled);
}
@@ -940,7 +944,34 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
}
+
+ // disabled deferred
+ if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred"))
+ {
+ ctrl_shadows->setEnabled(FALSE);
+ ctrl_shadows->setValue(0);
+
+ ctrl_ssao->setEnabled(FALSE);
+ ctrl_ssao->setValue(FALSE);
+
+ ctrl_deferred->setEnabled(FALSE);
+ ctrl_deferred->setValue(FALSE);
+ }
+
+ // disabled deferred SSAO
+ if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO"))
+ {
+ ctrl_ssao->setEnabled(FALSE);
+ ctrl_ssao->setValue(FALSE);
+ }
+ // disabled deferred shadows
+ if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail"))
+ {
+ ctrl_shadows->setEnabled(FALSE);
+ ctrl_shadows->setValue(0);
+ }
+
// disabled reflections
if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionDetail"))
{
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index a0d0b9d490..0e29851778 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -375,7 +375,8 @@ void LLViewerShaderMgr::setShaders()
S32 water_class = 2;
S32 deferred_class = 0;
- if (gSavedSettings.getBOOL("RenderDeferred"))
+ if (LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
+ gSavedSettings.getBOOL("RenderDeferred"))
{
if (gSavedSettings.getS32("RenderShadowDetail") > 0)
{
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 7c618162a4..4fbc6bb5da 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -631,10 +631,11 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
void LLPipeline::updateRenderDeferred()
{
BOOL deferred = (gSavedSettings.getBOOL("RenderDeferred") &&
- LLRenderTarget::sUseFBO &&
- gSavedSettings.getBOOL("VertexShaderEnable") &&
- gSavedSettings.getBOOL("RenderAvatarVP") &&
- gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE;
+ LLRenderTarget::sUseFBO &&
+ LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
+ gSavedSettings.getBOOL("VertexShaderEnable") &&
+ gSavedSettings.getBOOL("RenderAvatarVP") &&
+ gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE;
sRenderDeferred = deferred;
}