summaryrefslogtreecommitdiff
path: root/indra/newview/llworld.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llworld.cpp')
-rw-r--r--indra/newview/llworld.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 9e495c46b1..0a622997f7 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -133,6 +133,9 @@ void LLWorld::destroyClass()
{
mEdgeWaterObjects[i] = NULL;
}
+
+ //make all visible drawbles invisible.
+ LLDrawable::incrementVisible();
}
@@ -599,7 +602,8 @@ void LLWorld::updateVisibilities()
if (part)
{
LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0);
- if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1]))
+ const LLVector4a* bounds = group->getBounds();
+ if (LLViewerCamera::getInstance()->AABBInFrustum(bounds[0], bounds[1]))
{
mCulledRegionList.erase(curiter);
mVisibleRegionList.push_back(regionp);
@@ -622,7 +626,8 @@ void LLWorld::updateVisibilities()
if (part)
{
LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0);
- if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1]))
+ const LLVector4a* bounds = group->getBounds();
+ if (LLViewerCamera::getInstance()->AABBInFrustum(bounds[0], bounds[1]))
{
regionp->calculateCameraDistance();
regionp->getLand().updatePatchVisibilities(gAgent);
@@ -644,8 +649,8 @@ void LLWorld::updateVisibilities()
void LLWorld::updateRegions(F32 max_update_time)
{
LLTimer update_timer;
- BOOL did_one = FALSE;
-
+ BOOL did_one = FALSE;
+
// Perform idle time updates for the regions (and associated surfaces)
for (region_list_t::iterator iter = mRegionList.begin();
iter != mRegionList.end(); ++iter)
@@ -660,6 +665,13 @@ void LLWorld::updateRegions(F32 max_update_time)
did_one = TRUE;
}
}
+
+ mNumOfActiveCachedObjects = 0;
+ for (region_list_t::iterator iter = mRegionList.begin();
+ iter != mRegionList.end(); ++iter)
+ {
+ mNumOfActiveCachedObjects += (*iter)->getNumOfActiveCachedObjects();
+ }
}
void LLWorld::updateParticles()