From c0ba626c8009b22310b3923e8170e5db2a021253 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 15 Oct 2012 21:34:29 -0600 Subject: For SH-3333: Design and implement a new object cache system on viewer side --- indra/newview/llviewerpartsim.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerpartsim.cpp') diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 6bd9f66b9c..8acdc08b00 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -151,8 +151,8 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 bo if (group != NULL) { - LLVector3 center(group->mOctreeNode->getCenter().getF32ptr()); - LLVector3 size(group->mOctreeNode->getSize().getF32ptr()); + LLVector3 center(group->getOctreeNode()->getCenter().getF32ptr()); + LLVector3 size(group->getOctreeNode()->getSize().getF32ptr()); size += LLVector3(0.01f, 0.01f, 0.01f); mMinObjPos = center - size; mMaxObjPos = center + size; -- cgit v1.2.3 From 7a33d88886d9f9d83d3d12c95bb41e0093159d58 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 28 Mar 2013 16:52:36 -0600 Subject: freeze particle system when monitor scene loading --- indra/newview/llviewerpartsim.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview/llviewerpartsim.cpp') diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 8acdc08b00..a23a15da32 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -467,6 +467,20 @@ LLViewerPartSim::LLViewerPartSim() mID = ++id_seed; } +//enable/disable particle system +void LLViewerPartSim::enable(bool enabled) +{ + if(!enabled && sMaxParticleCount > 0) + { + sMaxParticleCount = 0; //disable + } + else if(enabled && sMaxParticleCount < 1) + { + sMaxParticleCount = llmin(gSavedSettings.getS32("RenderMaxPartCount"), LL_MAX_PARTICLE_COUNT); + } + + return; +} void LLViewerPartSim::destroyClass() { -- cgit v1.2.3 From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/newview/llviewerpartsim.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/llviewerpartsim.cpp') diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index a23a15da32..978c307c60 100755 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -125,7 +125,7 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 bo if (!mRegionp) { - //llwarns << "No region at position, using agent region!" << llendl; + //LL_WARNS() << "No region at position, using agent region!" << LL_ENDL; mRegionp = gAgent.getRegion(); } mCenterAgent = center_agent; @@ -451,12 +451,12 @@ void LLViewerPartSim::checkParticleCount(U32 size) { if(LLViewerPartSim::sParticleCount2 != LLViewerPartSim::sParticleCount) { - llerrs << "sParticleCount: " << LLViewerPartSim::sParticleCount << " ; sParticleCount2: " << LLViewerPartSim::sParticleCount2 << llendl ; + LL_ERRS() << "sParticleCount: " << LLViewerPartSim::sParticleCount << " ; sParticleCount2: " << LLViewerPartSim::sParticleCount2 << LL_ENDL ; } if(size > (U32)LLViewerPartSim::sParticleCount2) { - llerrs << "curren particle size: " << LLViewerPartSim::sParticleCount2 << " array size: " << size << llendl ; + LL_ERRS() << "curren particle size: " << LLViewerPartSim::sParticleCount2 << " array size: " << size << LL_ENDL ; } } @@ -544,8 +544,8 @@ LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part) if (part->mPosAgent.magVecSquared() > MAX_MAG || !part->mPosAgent.isFinite()) { #if 0 && !LL_RELEASE_FOR_DOWNLOAD - llwarns << "LLViewerPartSim::put Part out of range!" << llendl; - llwarns << part->mPosAgent << llendl; + LL_WARNS() << "LLViewerPartSim::put Part out of range!" << LL_ENDL; + LL_WARNS() << part->mPosAgent << LL_ENDL; #endif } else @@ -574,9 +574,9 @@ LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part) !(part->mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK)); if (!groupp->addPart(part)) { - llwarns << "LLViewerPartSim::put - Particle didn't go into its box!" << llendl; - llinfos << groupp->getCenterAgent() << llendl; - llinfos << part->mPosAgent << llendl; + LL_WARNS() << "LLViewerPartSim::put - Particle didn't go into its box!" << LL_ENDL; + LL_INFOS() << groupp->getCenterAgent() << LL_ENDL; + LL_INFOS() << part->mPosAgent << LL_ENDL; mViewerPartGroups.pop_back() ; delete groupp; groupp = NULL ; @@ -758,7 +758,7 @@ void LLViewerPartSim::updateSimulation() updatePartBurstRate() ; - //llinfos << "Particles: " << sParticleCount << " Adaptive Rate: " << sParticleAdaptiveRate << llendl; + //LL_INFOS() << "Particles: " << sParticleCount << " Adaptive Rate: " << sParticleAdaptiveRate << LL_ENDL; } void LLViewerPartSim::updatePartBurstRate() @@ -796,7 +796,7 @@ void LLViewerPartSim::addPartSource(LLPointer sourcep) { if (!sourcep) { - llwarns << "Null part source!" << llendl; + LL_WARNS() << "Null part source!" << LL_ENDL; return; } sourcep->setStart() ; -- cgit v1.2.3 From cbe397ad13665c7bc993e10d8fe1e4a876253378 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 5 Sep 2013 14:04:13 -0700 Subject: changed fast timer over to using macro another attempt to move mem stat into base class --- indra/newview/llviewerpartsim.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerpartsim.cpp') diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 09b6b8eb4b..eb89a887ac 100755 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -631,7 +631,7 @@ void LLViewerPartSim::shift(const LLVector3 &offset) } } -static LLFastTimer::DeclareTimer FTM_SIMULATE_PARTICLES("Simulate Particles"); +static LLTrace::TimeBlock FTM_SIMULATE_PARTICLES("Simulate Particles"); void LLViewerPartSim::updateSimulation() { @@ -644,7 +644,7 @@ void LLViewerPartSim::updateSimulation() return; } - LLFastTimer ftm(FTM_SIMULATE_PARTICLES); + LL_RECORD_BLOCK_TIME(FTM_SIMULATE_PARTICLES); // Start at a random particle system so the same // particle system doesn't always get first pick at the -- cgit v1.2.3 From 697d2e720ba75e142a4d56ae8794bab8d7698dad Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 15 Oct 2013 20:24:42 -0700 Subject: renamed TimeBlock to BlockTimerStatHandle --- indra/newview/llviewerpartsim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerpartsim.cpp') diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index cdb58f76d0..76418ad6a6 100755 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -657,7 +657,7 @@ void LLViewerPartSim::shift(const LLVector3 &offset) } } -static LLTrace::TimeBlock FTM_SIMULATE_PARTICLES("Simulate Particles"); +static LLTrace::BlockTimerStatHandle FTM_SIMULATE_PARTICLES("Simulate Particles"); void LLViewerPartSim::updateSimulation() { -- cgit v1.2.3