From db9616811d45e168d81c8e464fb8a9cf27e51172 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Thu, 26 Aug 2010 11:04:43 -0700 Subject: Ported gSavedSettings changes from Emerald (as well as modifying a few of ours) --- linden/indra/newview/pipeline.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'linden/indra/newview/pipeline.cpp') diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index e024e4c..0ca94dc 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp @@ -1014,8 +1014,8 @@ U32 LLPipeline::addObject(LLViewerObject *vobj) { return 0; } - - if (gSavedSettings.getBOOL("RenderDelayCreation")) + static BOOL sRenderDelayCreation = gSavedSettings.getBOOL("RenderDelayCreation"); + if (sRenderDelayCreation) { mCreateQ.push_back(vobj); } @@ -1078,7 +1078,9 @@ void LLPipeline::createObject(LLViewerObject* vobj) markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE); - if (drawablep->getVOVolume() && gSavedSettings.getBOOL("RenderAnimateRes")) + static BOOL sRenderAnimateRes = gSavedSettings.getBOOL("RenderAnimateRes"); + + if (drawablep->getVOVolume() && sRenderAnimateRes) { // fun animated res drawablep->updateXform(TRUE); @@ -1117,7 +1119,8 @@ void LLPipeline::resetFrameStats() //external functions for asynchronous updating void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep) { - if (gSavedSettings.getBOOL("FreezeTime")) + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + if ((*sFreezeTime)) { return; } @@ -1147,7 +1150,8 @@ void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep) void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep) { - if (gSavedSettings.getBOOL("FreezeTime")) + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + if ((*sFreezeTime)) { return; } @@ -1200,7 +1204,8 @@ void LLPipeline::updateMove() LLFastTimer t(LLFastTimer::FTM_UPDATE_MOVE); LLMemType mt(LLMemType::MTYPE_PIPELINE); - if (gSavedSettings.getBOOL("FreezeTime")) + static BOOL* sFreezeTime = rebind_llcontrol("FreezeTime", &gSavedSettings, true); + if ((*sFreezeTime)) { return; } @@ -2295,8 +2300,10 @@ void LLPipeline::postSort(LLCamera& camera) std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater()); } + static BOOL* sBeaconsEnabled = rebind_llcontrol("BeaconsEnabled", &gSavedSettings, true); + // only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus - if (gSavedSettings.getBOOL("BeaconsEnabled") && !sShadowRender) + if (*sBeaconsEnabled && !sShadowRender) { if (sRenderScriptedTouchBeacons) { -- cgit v1.1