summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-09-18 15:48:52 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-09-18 15:48:52 -0600
commit19137ac8fcdc8783b317c967a222136b42ff3ed0 (patch)
tree36637d2619b0e0cc3abd51def7e94b9014ee8829 /indra
parentfb82d0c4dbb6f6e3c58cca6ab69d638bda851b34 (diff)
fix for SH-4500: Interesting: Some content on adjacent region not visible after teleport.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llviewerregion.cpp27
-rwxr-xr-xindra/newview/llvocache.cpp11
2 files changed, 15 insertions, 23 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 7cc4195a3d..abead17d6f 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1056,9 +1056,6 @@ F32 LLViewerRegion::updateVisibleEntries(F32 max_time)
bool needs_update = ((cur_frame - mImpl->mLastCameraUpdate) > 5) && ((camera_origin - mImpl->mLastCameraOrigin).lengthSquared() > 10.f);
//process visible entries
- max_time *= 0.5f; //only use up to half available time to update entries.
-
-#if 1
for(LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mVisibleEntries.begin(); iter != mImpl->mVisibleEntries.end();)
{
LLVOCacheEntry* vo_entry = *iter;
@@ -1109,7 +1106,6 @@ F32 LLViewerRegion::updateVisibleEntries(F32 max_time)
++iter;
}
}
-#endif
//process visible groups
std::set< LLPointer<LLviewerOctreeGroup> >::iterator group_iter = mImpl->mVisibleGroups.begin();
@@ -1146,7 +1142,7 @@ F32 LLViewerRegion::updateVisibleEntries(F32 max_time)
mImpl->mLastCameraUpdate = cur_frame;
}
- return 2.0f * max_time - update_timer.getElapsedTimeF32();
+ return max_time - update_timer.getElapsedTimeF32();
}
F32 LLViewerRegion::createVisibleObjects(F32 max_time)
@@ -1207,11 +1203,6 @@ BOOL LLViewerRegion::idleUpdate(F32 max_update_time)
max_update_time -= update_timer.getElapsedTimeF32();
- if(max_update_time < 0.f && !gViewerWindow->getProgressView()->getVisible())
- {
- return did_update;
- }
-
//kill invisible objects
max_update_time = killInvisibleObjects(max_update_time);
@@ -1954,6 +1945,12 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)
{
entry->setBoundingInfo(pos, scale);
parent->addChild(entry);
+
+ if(parent->getGroup()) //re-insert parent to vo-cache tree because its bounding info changed.
+ {
+ removeFromVOCacheTree(parent);
+ addToVOCacheTree(parent);
+ }
}
}
@@ -1963,11 +1960,7 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)
//
//no parent
//
- entry->setBoundingInfo(pos, scale);
- if(!entry->getGroup() && entry->isState(LLVOCacheEntry::INACTIVE))
- {
- addToVOCacheTree(entry);
- }
+ entry->setBoundingInfo(pos, scale);
if(!parent_id) //a potential parent
{
@@ -1990,6 +1983,10 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)
}
}
+ if(!entry->getGroup() && entry->isState(LLVOCacheEntry::INACTIVE))
+ {
+ addToVOCacheTree(entry);
+ }
return ;
}
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index c2b09246e9..5932fb87c1 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -258,12 +258,6 @@ void LLVOCacheEntry::addChild(LLVOCacheEntry* entry)
if(getEntry() != NULL && isState(INACTIVE))
{
updateParentBoundingInfo(entry);
- if(getGroup())
- {
- LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)getGroup();
- group->unbound();
- ((LLVOCachePartition*)group->getSpatialPartition())->setDirty();
- }
}
}
@@ -636,6 +630,8 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
return 0;
}
+ ((LLviewerOctreeGroup*)mOctree->getListener(0))->rebound();
+
if(LLViewerCamera::sCurCameraID >= LLViewerCamera::CAMERA_WATER0)
{
return 0; //no need for those cameras.
@@ -651,8 +647,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
{
return 0; //nothing changed, skip culling
}
-
- ((LLviewerOctreeGroup*)mOctree->getListener(0))->rebound();
+
mCullHistory[LLViewerCamera::sCurCameraID] <<= 1;
//localize the camera