diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml | 14 |
3 files changed, 36 insertions, 7 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); diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 619a9078be..637cba6d6c 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -363,8 +363,8 @@ void LLViewerShaderMgr::setShaders() reentrance = true; - if (LLRender::sGLCoreProfile || (gGLManager.mGLVersion >= 2.f && !gGLManager.mIsIntel)) - { //ALWAYS use shaders where available (except for intel, intel prefers fixed function) + if (LLRender::sGLCoreProfile) + { if (!gSavedSettings.getBOOL("VertexShaderEnable")) { //vertex shaders MUST be enabled to use core profile gSavedSettings.setBOOL("VertexShaderEnable", TRUE); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index c25c1f23f5..f7666bdc4c 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -204,6 +204,20 @@ name="LocalLights" top_pad="1" width="256" /> + <check_box + control_name="VertexShaderEnable" + height="16" + initial_value="true" + label="Basic shaders" + layout="topleft" + left_delta="0" + name="BasicShaders" + tool_tip="Disabling this option may prevent some graphics card drivers from crashing" + top_pad="1" + width="315"> + <check_box.commit_callback + function="Pref.VertexShaderEnable" /> + </check_box> <check_box control_name="WindLightUseAtmosShaders" height="16" |