diff options
Diffstat (limited to 'indra/newview/llfloaterpreferencesgraphicsadvanced.cpp')
-rw-r--r-- | indra/newview/llfloaterpreferencesgraphicsadvanced.cpp | 52 |
1 files changed, 42 insertions, 10 deletions
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp index bc8e0723ce..94b95b21c2 100644 --- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp +++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp @@ -51,6 +51,8 @@ LLFloaterPreferenceGraphicsAdvanced::LLFloaterPreferenceGraphicsAdvanced(const L mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onBtnCancel, this, _2)); mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onBtnOK, this, _2)); + + mImpostorsChangedSignal = gSavedSettings.getControl("RenderAvatarMaxNonImpostors")->getSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateIndirectMaxNonImpostors, this, _2)); } LLFloaterPreferenceGraphicsAdvanced::~LLFloaterPreferenceGraphicsAdvanced() @@ -58,22 +60,28 @@ LLFloaterPreferenceGraphicsAdvanced::~LLFloaterPreferenceGraphicsAdvanced() mComplexityChangedSignal.disconnect(); mComplexityModeChangedSignal.disconnect(); mLODFactorChangedSignal.disconnect(); - mNumImpostorsChangedSignal.disconnect(); } bool LLFloaterPreferenceGraphicsAdvanced::postBuild() { - // Don't do this on Mac as their braindead GL versioning - // sets this when 8x and 16x are indeed available + // Disable FSAA combo when shaders are not loaded // -#if !LL_DARWIN - if (gGLManager.mIsIntel || gGLManager.mGLVersion < 3.f) - { //remove FSAA settings above "4x" + { LLComboBox* combo = getChild<LLComboBox>("fsaa"); - combo->remove("8x"); - combo->remove("16x"); + if (!gFXAAProgram[0].isComplete()) + combo->remove("FXAA"); + + if (!gSMAAEdgeDetectProgram[0].isComplete()) + combo->remove("SMAA"); + + if (!gFXAAProgram[0].isComplete() && !gSMAAEdgeDetectProgram[0].isComplete()) + { + combo->setEnabled(false); + getChild<LLComboBox>("fsaa quality")->setEnabled(false); + } } +#if !LL_DARWIN LLCheckBoxCtrl *use_HiDPI = getChild<LLCheckBoxCtrl>("use HiDPI"); use_HiDPI->setVisible(false); #endif @@ -140,8 +148,6 @@ void LLFloaterPreferenceGraphicsAdvanced::onAdvancedAtmosphericsEnable() void LLFloaterPreferenceGraphicsAdvanced::refresh() { - getChild<LLUICtrl>("fsaa")->setValue((LLSD::Integer) gSavedSettings.getU32("RenderFSAASamples")); - // sliders and their text boxes // mPostProcess = gSavedSettings.getS32("RenderGlowResolutionPow"); // slider text boxes @@ -268,11 +274,14 @@ void LLFloaterPreferenceGraphicsAdvanced::setMaxNonImpostorsText(U32 value, LLTe void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings() { LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail"); + LLComboBox* ctrl_shadows_quality = getChild<LLComboBox>("MPShadowQuality"); LLTextBox* shadows_text = getChild<LLTextBox>("RenderShadowDetailText"); + LLTextBox* shadows_quality_text = getChild<LLTextBox>("RenderShadowQualityText"); LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO"); LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF"); LLSliderCtrl* sky = getChild<LLSliderCtrl>("SkyMeshDetail"); LLTextBox* sky_text = getChild<LLTextBox>("SkyMeshDetailText"); + LLSliderCtrl* cas_slider = getChild<LLSliderCtrl>("RenderSharpness"); // disabled windlight if (!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders")) @@ -283,7 +292,9 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings() //deferred needs windlight, disable deferred ctrl_shadows->setEnabled(false); ctrl_shadows->setValue(0); + ctrl_shadows_quality->setEnabled(false); shadows_text->setEnabled(false); + shadows_quality_text->setEnabled(false); ctrl_ssao->setEnabled(false); ctrl_ssao->setValue(false); @@ -297,7 +308,9 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings() { ctrl_shadows->setEnabled(false); ctrl_shadows->setValue(0); + ctrl_shadows_quality->setEnabled(false); shadows_text->setEnabled(false); + shadows_quality_text->setEnabled(false); ctrl_ssao->setEnabled(false); ctrl_ssao->setValue(false); @@ -318,8 +331,23 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings() { ctrl_shadows->setEnabled(false); ctrl_shadows->setValue(0); + ctrl_shadows_quality->setEnabled(false); shadows_text->setEnabled(false); + shadows_quality_text->setEnabled(false); } + + // Vintage mode + static LLCachedControl<bool> is_not_vintage(gSavedSettings, "RenderDisableVintageMode"); + LLSliderCtrl* tonemapMix = getChild<LLSliderCtrl>("TonemapMix"); + LLComboBox* tonemapSelect = getChild<LLComboBox>("TonemapType"); + LLTextBox* tonemapLabel = getChild<LLTextBox>("TonemapTypeText"); + LLSliderCtrl* exposureSlider = getChild<LLSliderCtrl>("RenderExposure"); + + tonemapSelect->setEnabled(is_not_vintage); + tonemapLabel->setEnabled(is_not_vintage); + tonemapMix->setEnabled(is_not_vintage); + exposureSlider->setEnabled(is_not_vintage); + cas_slider->setEnabled(is_not_vintage); } void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() @@ -335,7 +363,9 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO"); LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF"); LLComboBox* ctrl_shadow = getChild<LLComboBox>("ShadowDetail"); + LLComboBox* ctrl_shadow_quality = getChild<LLComboBox>("MPShadowQuality"); LLTextBox* shadow_text = getChild<LLTextBox>("RenderShadowDetailText"); + LLTextBox* shadows_quality_text = getChild<LLTextBox>("RenderShadowQualityText"); // note, okay here to get from ctrl_deferred as it's twin, ctrl_deferred2 will alway match it enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO");// && ctrl_deferred->get(); @@ -348,7 +378,9 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail"); ctrl_shadow->setEnabled(enabled); + ctrl_shadow_quality->setEnabled(enabled); shadow_text->setEnabled(enabled); + shadows_quality_text->setEnabled(enabled); // Hardware settings |