summaryrefslogtreecommitdiff
path: root/indra/newview/llviewercontrol.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-11-23 21:23:45 -0500
committerNat Goodspeed <nat@lindenlab.com>2021-11-23 21:23:45 -0500
commitd71e0a6d4778d4c67b8793ba569fee2db226bc8e (patch)
treedce713230aa611dbada3c6f78903d988b1ae06a4 /indra/newview/llviewercontrol.cpp
parent67ace0df9953ce3264048c3946720a9df492edfa (diff)
parent8852cb9cbd25df8d25fa43cf39b222ab8381ebd6 (diff)
SL-16094, SL-16400: Merge branch 'DRTVWR-546' into glthread
Diffstat (limited to 'indra/newview/llviewercontrol.cpp')
-rw-r--r--indra/newview/llviewercontrol.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index e5ebbcb9ab..9f76543647 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -107,10 +107,14 @@ static bool handleRenderAvatarMouselookChanged(const LLSD& newvalue)
static bool handleRenderFarClipChanged(const LLSD& newvalue)
{
- F32 draw_distance = (F32) newvalue.asReal();
- gAgentCamera.mDrawDistance = draw_distance;
- LLWorld::getInstance()->setLandFarClip(draw_distance);
- return true;
+ if (LLStartUp::getStartupState() >= STATE_STARTED)
+ {
+ F32 draw_distance = (F32)newvalue.asReal();
+ gAgentCamera.mDrawDistance = draw_distance;
+ LLWorld::getInstance()->setLandFarClip(draw_distance);
+ return true;
+ }
+ return false;
}
static bool handleTerrainDetailChanged(const LLSD& newvalue)
@@ -143,6 +147,20 @@ static bool handleSetShaderChanged(const LLSD& newvalue)
gBumpImageList.destroyGL();
gBumpImageList.restoreGL();
+ if (gPipeline.isInit())
+ {
+ // ALM depends onto atmospheric shaders, state might have changed
+ bool old_state = LLPipeline::sRenderDeferred;
+ LLPipeline::refreshCachedSettings();
+ gPipeline.updateRenderDeferred();
+ if (old_state != LLPipeline::sRenderDeferred)
+ {
+ gPipeline.releaseGLBuffers();
+ gPipeline.createGLBuffers();
+ gPipeline.resetVertexBuffers();
+ }
+ }
+
// else, leave terrain detail as is
LLViewerShaderMgr::instance()->setShaders();
return true;