summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-10-25 15:07:57 -0500
committerDave Parks <davep@lindenlab.com>2011-10-25 15:07:57 -0500
commit7dafa1be79f4e3f454ce022326cb09fa5cabb003 (patch)
treeada853a78bca98f0cf4ed19d628690e7e2692f9d /indra/newview/llfloaterpreference.cpp
parent30d1a2d053fe7d6e0c88928cf51aa73865ee21e8 (diff)
SH-2622 Put back "Basic Shaders" toggle ability.
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rwxr-xr-xindra/newview/llfloaterpreference.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 92c4214fdb..5fdeb46daa 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1034,19 +1034,30 @@ void LLFloaterPreference::refreshEnabledState()
}
// Vertex Shaders
+ // Global Shader Enable
+ LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
// radio set for terrain detail mode
LLRadioGroup* mRadioTerrainDetail = getChild<LLRadioGroup>("TerrainDetailRadio"); // can be linked with control var
- BOOL shaders = gGLManager.mGLVersion >= 2.f;
-
- mRadioTerrainDetail->setEnabled(TRUE);
-
+ ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
+
+ BOOL shaders = ctrl_shader_enable->get();
+ if (shaders)
+ {
+ mRadioTerrainDetail->setValue(1);
+ mRadioTerrainDetail->setEnabled(FALSE);
+ }
+ else
+ {
+ mRadioTerrainDetail->setEnabled(TRUE);
+ }
+
// WindLight
LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
// *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(shaders);
+ ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
//Deferred/SSAO/Shadows
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
@@ -1084,6 +1095,7 @@ void LLFloaterPreference::disableUnavailableSettings()
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");
@@ -1094,6 +1106,9 @@ void LLFloaterPreference::disableUnavailableSettings()
// if vertex shaders off, disable all shader related products
if (!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"))
{
+ ctrl_shader_enable->setEnabled(FALSE);
+ ctrl_shader_enable->setValue(FALSE);
+
ctrl_wind_light->setEnabled(FALSE);
ctrl_wind_light->setValue(FALSE);