From c334a185f331a3392c2d0ccaf8241166ef9d8049 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 14 May 2013 05:59:48 -0700 Subject: NORSPEC-151 NORSPEC-152 fix handling of disable of bumpy and shiny in graphics panel to also disable deferred properly and add hooks for default norm and spec textures in texture picker --- indra/newview/llviewercontrol.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewercontrol.cpp') diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index a62f73deef..afbb59e723 100755 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -401,6 +401,25 @@ static bool handleRenderDeferredChanged(const LLSD& newvalue) 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. +// +static bool handleRenderBumpChanged(const LLSD& newval) +{ + LLRenderTarget::sUseFBO = newval.asBoolean(); + if (gPipeline.isInit()) + { + gPipeline.updateRenderBump(); + gPipeline.updateRenderDeferred(); + gPipeline.releaseGLBuffers(); + gPipeline.createGLBuffers(); + gPipeline.resetVertexBuffers(); + LLViewerShaderMgr::instance()->setShaders(); + } + return true; +} + static bool handleRenderUseImpostorsChanged(const LLSD& newvalue) { LLVOAvatar::sUseImpostors = newvalue.asBoolean(); @@ -629,7 +648,7 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderDebugTextureBind")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); gSavedSettings.getControl("RenderAutoMaskAlphaDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); - gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); + gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleRenderBumpChanged, _2)); gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); gSavedSettings.getControl("RenderDeferredNoise")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2)); gSavedSettings.getControl("RenderUseImpostors")->getSignal()->connect(boost::bind(&handleRenderUseImpostorsChanged, _2)); -- cgit v1.2.3