summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2021-09-01 17:42:22 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2021-09-01 17:42:22 +0300
commitefb50dced0fe03bbd684417708a33fea0ae9fa33 (patch)
tree9fa7bbbb79d8423bf1215ec6646c51c1ac6cf6ae /indra
parent3e3087a135d71527379ce9e60ea7f01cef9670bf (diff)
SL-15872 fixed more cases where sUseFBO wasn't updated correctly
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llappviewer.cpp4
-rw-r--r--indra/newview/llviewercontrol.cpp23
2 files changed, 22 insertions, 5 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 891722e1bd..146d2899e7 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -608,10 +608,10 @@ static void settings_to_globals()
static void settings_modify()
{
- LLRenderTarget::sUseFBO = gSavedSettings.getBOOL("RenderDeferred");
LLPipeline::sRenderTransparentWater = gSavedSettings.getBOOL("RenderTransparentWater");
LLPipeline::sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
- LLPipeline::sRenderDeferred = LLPipeline::sRenderTransparentWater && LLPipeline::sRenderBump && gSavedSettings.getBOOL("RenderDeferred");
+ LLPipeline::sRenderDeferred = LLPipeline::sRenderTransparentWater && LLPipeline::sRenderBump && gSavedSettings.getBOOL("RenderDeferred");
+ LLRenderTarget::sUseFBO = LLPipeline::sRenderDeferred && gSavedSettings.getBOOL("RenderAvatarVP");
LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor");
LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4]
gDebugGL = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession;
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index ebe1e99eb6..fabd20042b 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -148,6 +148,17 @@ static bool handleSetShaderChanged(const LLSD& newvalue)
return true;
}
+static bool handleAvatarVPChanged(const LLSD& newvalue)
+{
+ LLRenderTarget::sUseFBO = newvalue.asBoolean()
+ && gSavedSettings.getBOOL("RenderObjectBump")
+ && gSavedSettings.getBOOL("RenderTransparentWater")
+ && gSavedSettings.getBOOL("RenderDeferred");
+
+ handleSetShaderChanged(LLSD());
+ return true;
+}
+
static bool handleRenderPerfTestChanged(const LLSD& newvalue)
{
bool status = !newvalue.asBoolean();
@@ -187,7 +198,10 @@ static bool handleRenderPerfTestChanged(const LLSD& newvalue)
bool handleRenderTransparentWaterChanged(const LLSD& newvalue)
{
- LLRenderTarget::sUseFBO = newvalue.asBoolean() && gSavedSettings.getBOOL("RenderObjectBump") && gSavedSettings.getBOOL("RenderDeferred");
+ LLRenderTarget::sUseFBO = newvalue.asBoolean()
+ && gSavedSettings.getBOOL("RenderObjectBump")
+ && gSavedSettings.getBOOL("RenderAvatarVP")
+ && gSavedSettings.getBOOL("RenderDeferred");
if (gPipeline.isInit())
{
gPipeline.updateRenderTransparentWater();
@@ -440,7 +454,10 @@ static bool handleRenderDeferredChanged(const LLSD& newvalue)
//
static bool handleRenderBumpChanged(const LLSD& newval)
{
- LLRenderTarget::sUseFBO = newval.asBoolean() && gSavedSettings.getBOOL("RenderTransparentWater") && gSavedSettings.getBOOL("RenderDeferred");
+ LLRenderTarget::sUseFBO = newval.asBoolean()
+ && gSavedSettings.getBOOL("RenderTransparentWater")
+ && gSavedSettings.getBOOL("RenderAvatarVP")
+ && gSavedSettings.getBOOL("RenderDeferred");
if (gPipeline.isInit())
{
gPipeline.updateRenderBump();
@@ -634,7 +651,7 @@ void settings_setup_listeners()
gSavedSettings.getControl("OctreeAttachmentSizeFactor")->getSignal()->connect(boost::bind(&handleRepartition, _2));
gSavedSettings.getControl("RenderMaxTextureIndex")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderUseTriStrips")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
- gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
+ gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleAvatarVPChanged, _2));
gSavedSettings.getControl("RenderUIBuffer")->getSignal()->connect(boost::bind(&handleWindowResized, _2));
gSavedSettings.getControl("RenderDepthOfField")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderFSAASamples")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));