From 642a4ddd60745db292c543a5cea3b1e5fe606795 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 10 Sep 2018 20:39:48 +0100 Subject: Fixes for switching between atmospherics implementations on the fly. --- indra/newview/llviewercontrol.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/llviewercontrol.cpp') diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 88984d518a..ebc55fa0dd 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -410,6 +410,17 @@ static bool handleRenderDeferredChanged(const LLSD& newvalue) return true; } +static bool handleRenderUseAdvancedAtmosphericsChanged(const LLSD& newvalue) +{ + if (gPipeline.isInit()) + { + LLPipeline::refreshCachedSettings(); + // Need to reload shaders when changing atmospherics implementations... + LLViewerShaderMgr::instance()->setShaders(); + } + return true; +} + // This looks a great deal like handleRenderDeferredChanged because // Advanced Lighting (Materials) implies bumps and shiny so disabling // bumps should further disable that feature. @@ -644,6 +655,7 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _2)); gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _2)); gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleRenderDeferredChanged, _2)); + gSavedSettings.getControl("RenderUseAdvancedAtmospherics")->getSignal()->connect(boost::bind(&handleRenderUseAdvancedAtmosphericsChanged, _2)); gSavedSettings.getControl("RenderShadowDetail")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderDeferredSSAO")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderPerformanceTest")->getSignal()->connect(boost::bind(&handleRenderPerfTestChanged, _2)); -- cgit v1.2.3