diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 43fedeca64053ddc78a3d202c0170baec33b35c8..fe399ad882052bfa147c762c9644286763f28cda 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -62,6 +62,7 @@ BOOL gDebugSession = FALSE; BOOL gClothRipple = FALSE; BOOL gHeadlessClient = FALSE; +BOOL gNonInteractive = FALSE; BOOL gGLActive = FALSE; BOOL gGLDebugLoggingEnabled = TRUE; diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index a07e2d9bb02871a8a724fa00c0d46ebd00fb1335..53d077b99464fe2cda54a54830ebd544acd502d3 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -488,6 +488,7 @@ void parse_gl_version( S32* major, S32* minor, S32* release, std::string* vendor extern BOOL gClothRipple; extern BOOL gHeadlessClient; +extern BOOL gNonInteractive; extern BOOL gGLActive; // Deal with changing glext.h definitions for newer SDK versions, specifically diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6ff9b2b2eb996227cf0fe87d71507afa6fc2abbc..970bc0a83df3ff6c2ae39d9b05886f242027b93c 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1557,8 +1557,7 @@ bool LLAppViewer::doFrame() ms_sleep(yield_time); } - static LLCachedControl<bool> s_non_interactive(gSavedSettings, "NonInteractive", false); - if (s_non_interactive) + if (gNonInteractive) { S32 non_interactive_ms_sleep_time = 1000; LLAppViewer::getTextureCache()->pause(); @@ -2979,6 +2978,7 @@ bool LLAppViewer::initWindow() // store setting in a global for easy access and modification gHeadlessClient = gSavedSettings.getBOOL("HeadlessClient"); + gNonInteractive = gSavedSettings.getBOOL("NonInteractive"); // always start windowed BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth"); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 82152a6cf50657601234f009fd38df63b308dade..8064e998f1c9b00b5191ed54cf339786e073cae1 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1687,7 +1687,7 @@ void LLViewerMediaImpl::setMediaType(const std::string& media_type) /*static*/ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, F64 zoom_factor, const std::string target, bool clean_browser) { - if (gSavedSettings.getBOOL("NonInteractive")) + if (gNonInteractive) { return NULL; } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 1852d4980ff855ab5a5a0fa5176466eb114e0ab3..528448c4774986fd68848cd8bf2b3fc5d08cbb68 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -107,6 +107,7 @@ #include "llcleanup.h" #include "llcallstack.h" #include "llmeshrepository.h" +#include "llgl.h" //#define DEBUG_UPDATE_TYPE @@ -153,8 +154,6 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco LL_DEBUGS("ObjectUpdate") << "creating " << id << LL_ENDL; dumpStack("ObjectUpdateStack"); - static LLCachedControl<bool> s_non_interactive(gSavedSettings, "NonInteractive", false); - LLViewerObject *res = NULL; LL_RECORD_BLOCK_TIME(FTM_CREATE_OBJECT); @@ -162,7 +161,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco { case LL_PCODE_VOLUME: { - if (!s_non_interactive) + if (!gNonInteractive) { res = new LLVOVolume(id, pcode, regionp); break; } @@ -201,7 +200,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco } else { - if (!s_non_interactive) + if (!gNonInteractive) { LLVOAvatar *avatar = new LLVOAvatar(id, pcode, regionp); avatar->initInstance(); diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 9fe80b38d642dd41d3947cd962abd7172b78f75c..fbd44c198b1af3ee59c39443de873d109a1d5e1a 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -304,10 +304,9 @@ static LLTrace::BlockTimerStatHandle FTM_PROCESS_OBJECTS("Process Objects"); LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp) { - static LLCachedControl<bool> s_non_interactive(gSavedSettings, "NonInteractive", false); LLDataPacker *cached_dpp = entry->getDP(); - if (!cached_dpp || s_non_interactive) + if (!cached_dpp || gNonInteractive) { return NULL; //nothing cached. } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 43ae0c2e763ddd9203a29b17037b6c0a20aa876e..30703426ce094936ec9ab9c911ecd82a66f664df 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1158,8 +1158,7 @@ void LLPipeline::refreshCachedSettings() RenderSpotLight = nullptr; updateRenderDeferred(); - bool non_interactive = gSavedSettings.getBOOL("NonInteractive"); - if (non_interactive) + if (gNonInteractive) { LLVOAvatar::sMaxNonImpostors = 1; LLVOAvatar::updateImpostorRendering(LLVOAvatar::sMaxNonImpostors);