summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-06 14:47:43 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-06 14:47:43 +0100
commit3c47d1faf1abb38ad05036de65bea3b7e21f683f (patch)
tree2a33d4ee90d0287436c63a5f8fa90cf8fd1d6ef6 /indra/newview/llfloaterpreference.cpp
parent20c660569df71f677065b5f5f66477ebbd6b35b6 (diff)
parenta63c59be9e7df57143ddd04e44263c232f420a21 (diff)
another hairy merge from viewer-trunk :(
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp64
1 files changed, 59 insertions, 5 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 804ef609ec..442504f516 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -797,7 +797,7 @@ void LLFloaterPreference::buildPopupLists()
void LLFloaterPreference::refreshEnabledState()
{
- LLCheckBoxCtrl* ctrl_reflections = getChild<LLCheckBoxCtrl>("Reflections");
+ LLComboBox* ctrl_reflections = getChild<LLComboBox>("Reflections");
LLRadioGroup* radio_reflection_detail = getChild<LLRadioGroup>("ReflectionDetailRadio");
// Reflections
@@ -810,7 +810,7 @@ void LLFloaterPreference::refreshEnabledState()
bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
getChild<LLCheckBoxCtrl>("BumpShiny")->setEnabled(bumpshiny ? TRUE : FALSE);
- radio_reflection_detail->setEnabled(ctrl_reflections->get() && reflections);
+ radio_reflection_detail->setEnabled(reflections);
// Avatar Mode
// Enable Avatar Shaders
@@ -856,18 +856,41 @@ void LLFloaterPreference::refreshEnabledState()
// *HACK just checks to see if we can use shaders...
// maybe some cards that use shaders, but don't support windlight
ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
+
+ //Deferred/SSAO/Shadows
+ LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
+ if (LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseFBO") &&
+ shaders)
+ {
+ 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);
+
+ ctrl_ssao->setEnabled(enabled);
+ ctrl_shadow->setEnabled(enabled);
+ }
+
+
// now turn off any features that are unavailable
disableUnavailableSettings();
}
void LLFloaterPreference::disableUnavailableSettings()
{
- LLCheckBoxCtrl* ctrl_reflections = getChild<LLCheckBoxCtrl>("Reflections");
+ LLComboBox* ctrl_reflections = getChild<LLComboBox>("Reflections");
LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
LLCheckBoxCtrl* ctrl_avatar_impostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
+ LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
+ LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail");
+ LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
// if vertex shaders off, disable all shader related products
if(!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"))
@@ -879,13 +902,22 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_wind_light->setValue(FALSE);
ctrl_reflections->setEnabled(FALSE);
- ctrl_reflections->setValue(FALSE);
+ ctrl_reflections->setValue(0);
ctrl_avatar_vp->setEnabled(FALSE);
ctrl_avatar_vp->setValue(FALSE);
ctrl_avatar_cloth->setEnabled(FALSE);
ctrl_avatar_cloth->setValue(FALSE);
+
+ 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 windlight
@@ -893,10 +925,20 @@ void LLFloaterPreference::disableUnavailableSettings()
{
ctrl_wind_light->setEnabled(FALSE);
ctrl_wind_light->setValue(FALSE);
+
+ //deferred needs windlight, disable deferred
+ 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 reflections
- if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderWaterReflections"))
+ if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionDetail"))
{
ctrl_reflections->setEnabled(FALSE);
ctrl_reflections->setValue(FALSE);
@@ -910,13 +952,25 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_avatar_cloth->setEnabled(FALSE);
ctrl_avatar_cloth->setValue(FALSE);
+
+ //deferred needs AvatarVP, disable deferred
+ 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 cloth
if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarCloth"))
{
ctrl_avatar_cloth->setEnabled(FALSE);
ctrl_avatar_cloth->setValue(FALSE);
}
+
// disabled impostors
if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors"))
{