summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-05-10 14:34:36 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-05-10 14:34:36 -0700
commita52019d6d1e15d0e826d279ebcaef2f99d293292 (patch)
tree2c42c520929293ed69c4df7fcbdf9dfe08e50f94 /indra/newview/llfloaterpreference.cpp
parent5f6559c0f662ae21306524a28d9c8ec0aa199163 (diff)
SH-1521 FIX -- Lighting and Shadows grayed out on mac
* Modified mac feature table to bring it up to date with latest renderer features including deferred rendering * Changed mac AGL pixel format to no longer allow it to revert to software rendering when shader compilation errors occur. * Fixed up various GLSL shader compilation warnings and errors that came up as a result of the above changes. * Changed initial conditions for the "hardware skinning" checkbox on the preferences floater so it can be modified before login on machines that support avatar vertex programs. * Removed unused avatarAlphaF.glsl files Reviewed by davep
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 18b7a48d7b..4b15695cbf 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -987,9 +987,15 @@ void LLFloaterPreference::refreshEnabledState()
LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
// Avatar Render Mode
LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
+
+ bool avatar_vp_enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarVP");
+ if (LLViewerShaderMgr::sInitialized)
+ {
+ S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel;
+ avatar_vp_enabled = (max_avatar_shader > 0) ? TRUE : FALSE;
+ }
- S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel;
- ctrl_avatar_vp->setEnabled((max_avatar_shader > 0) ? TRUE : FALSE);
+ ctrl_avatar_vp->setEnabled(avatar_vp_enabled);
if (gSavedSettings.getBOOL("VertexShaderEnable") == FALSE ||
gSavedSettings.getBOOL("RenderAvatarVP") == FALSE)
@@ -1006,7 +1012,7 @@ void LLFloaterPreference::refreshEnabledState()
LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
// radio set for terrain detail mode
LLRadioGroup* mRadioTerrainDetail = getChild<LLRadioGroup>("TerrainDetailRadio"); // can be linked with control var
-
+
ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
BOOL shaders = ctrl_shader_enable->get();