diff options
Diffstat (limited to 'indra/newview/llvocache.cpp')
-rwxr-xr-x | indra/newview/llvocache.cpp | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 3f01ffa3cd..0466dea39d 100755 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -361,6 +361,12 @@ bool LLVOCacheEntry::isRecentlyVisible() const { bool vis = LLViewerOctreeEntryData::isRecentlyVisible(); + if(!vis && getGroup()) + { + //recently visible to any camera? + vis = ((LLOcclusionCullingGroup*)getGroup())->isAnyRecentlyVisible(); + } + //combination of projected area and squared distance if(!vis && !mParentID && mSceneContrib > sBackAngleTanSquared) { @@ -475,9 +481,13 @@ void LLVOCacheEntry::updateParentBoundingInfo(const LLVOCacheEntry* child) //------------------------------------------------------------------- LLVOCacheGroup::~LLVOCacheGroup() { - if(mOcclusionState[0] & ACTIVE_OCCLUSION) + for(S32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++) { - ((LLVOCachePartition*)mSpatialPartition)->removeOccluder(this); + if(mOcclusionState[i] & ACTIVE_OCCLUSION) + { + ((LLVOCachePartition*)mSpatialPartition)->removeOccluder(this); + break; + } } } @@ -720,6 +730,10 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion) { return 0; } + if(mRegionp->isPaused()) + { + return 0; + } ((LLViewerOctreeGroup*)mOctree->getListener(0))->rebound(); @@ -785,7 +799,7 @@ void LLVOCachePartition::addOccluders(LLViewerOctreeGroup* gp) if(!group->isOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION)) { - group->setOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION, LLOcclusionCullingGroup::STATE_MODE_ALL_CAMERAS); + group->setOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION); mOccludedGroups.insert(group); } } @@ -802,7 +816,11 @@ void LLVOCachePartition::processOccluders(LLCamera* camera) for(std::set<LLVOCacheGroup*>::iterator iter = mOccludedGroups.begin(); iter != mOccludedGroups.end(); ++iter) { LLVOCacheGroup* group = *iter; - group->doOcclusion(camera, &shift); + if(group->isOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION)) + { + group->doOcclusion(camera, &shift); + group->clearOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION); + } } } |