diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 27 | ||||
-rwxr-xr-x | indra/newview/llviewermenu.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 19 |
3 files changed, 28 insertions, 21 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 9562f2d9d2..a90bacf41d 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1037,26 +1037,25 @@ void LLFloaterPreference::refreshEnabledState() //Deferred/SSAO/Shadows LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders"); - if (LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && - shaders && - gGLManager.mHasFramebufferObject) - { - BOOL enabled = (ctrl_wind_light->get()) ? TRUE : FALSE; + BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && + shaders && + gGLManager.mHasFramebufferObject && + gSavedSettings.getBOOL("RenderAvatarVP") && + (ctrl_wind_light->get()) ? TRUE : FALSE; - ctrl_deferred->setEnabled(enabled); + ctrl_deferred->setEnabled(enabled); - LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO"); - LLComboBox* ctrl_shadow = getChild<LLComboBox>("ShadowDetail"); + LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO"); + LLComboBox* ctrl_shadow = getChild<LLComboBox>("ShadowDetail"); - enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO") && (ctrl_deferred->get() ? TRUE : FALSE); + enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO") && (ctrl_deferred->get() ? TRUE : FALSE); - ctrl_ssao->setEnabled(enabled); + ctrl_ssao->setEnabled(enabled); - enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail"); - - ctrl_shadow->setEnabled(enabled); - } + enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail"); + ctrl_shadow->setEnabled(enabled); + // now turn off any features that are unavailable disableUnavailableSettings(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index eb022851e7..cfcce3e7bb 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2082,7 +2082,8 @@ class LLAdvancedEnableRenderDeferredOptions: public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool new_value = gSavedSettings.getBOOL("RenderDeferred"); + bool new_value = gGLManager.mHasFramebufferObject && LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_WINDLIGHT > 0) && + LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_AVATAR) > 0 && gSavedSettings.getBOOL("RenderDeferred"); return new_value; } }; diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index a9462c9d50..25cf63a367 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -397,7 +397,9 @@ void LLViewerShaderMgr::setShaders() S32 deferred_class = 0; if (LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && - gSavedSettings.getBOOL("RenderDeferred")) + gSavedSettings.getBOOL("RenderDeferred") && + gSavedSettings.getBOOL("RenderAvatarVP") && + gSavedSettings.getBOOL("WindLightUseAtmosShaders")) { if (gSavedSettings.getS32("RenderShadowDetail") > 0) { @@ -416,10 +418,10 @@ void LLViewerShaderMgr::setShaders() } //make sure hardware skinning is enabled - gSavedSettings.setBOOL("RenderAvatarVP", TRUE); + //gSavedSettings.setBOOL("RenderAvatarVP", TRUE); //make sure atmospheric shaders are enabled - gSavedSettings.setBOOL("WindLightUseAtmosShaders", TRUE); + //gSavedSettings.setBOOL("WindLightUseAtmosShaders", TRUE); } @@ -505,9 +507,14 @@ void LLViewerShaderMgr::setShaders() { //hardware skinning not possible, neither is deferred rendering mVertexShaderLevel[SHADER_AVATAR] = 0; mVertexShaderLevel[SHADER_DEFERRED] = 0; - gSavedSettings.setBOOL("RenderDeferred", FALSE); - gSavedSettings.setBOOL("RenderAvatarCloth", FALSE); - gSavedSettings.setBOOL("RenderAvatarVP", FALSE); + + if (gSavedSettings.getBOOL("RenderAvatarVP")) + { + gSavedSettings.setBOOL("RenderDeferred", FALSE); + gSavedSettings.setBOOL("RenderAvatarCloth", FALSE); + gSavedSettings.setBOOL("RenderAvatarVP", FALSE); + } + loadShadersAvatar(); // unloads loadShadersObject(); } |