diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-06-26 17:08:03 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-06-26 17:08:03 -0600 |
commit | 88fee7f87fc4a987a05002fedfcae11d6b42ba59 (patch) | |
tree | a3e86e4ddbc55aa7595425e93c0cd79804aa11b5 /indra/newview/llvocache.cpp | |
parent | c0fd2a15e49c4fc7578da4aa74c44e33cf45a3a1 (diff) |
more fix for SH-4284: interesting: viewer does not render cacheable objects on far corner of region when camera moves
Diffstat (limited to 'indra/newview/llvocache.cpp')
-rwxr-xr-x | indra/newview/llvocache.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 7eeabcba2e..60d78890b5 100755 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -494,7 +494,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera) if(!mOccludedGroups.empty()) { - processOccluders(&camera); + processOccluders(&camera, ®ion_agent); mOccludedGroups.clear(); } @@ -505,26 +505,26 @@ void LLVOCachePartition::addOccluders(LLviewerOctreeGroup* gp) { LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)gp; - const U32 MIN_WAIT_TIME = 16; //wait 16 frames to issue a new occlusion request + const U32 MIN_WAIT_TIME = 19; //wait 19 frames to issue a new occlusion request U32 last_issued_time = group->getLastOcclusionIssuedTime(); - if(gFrameCount > last_issued_time && gFrameCount < last_issued_time + MIN_WAIT_TIME) + if(!group->needsUpdate() && gFrameCount > last_issued_time && gFrameCount < last_issued_time + MIN_WAIT_TIME) { return; } - if(group && !group->isOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION)) + if(!group->isOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION)) { group->setOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION); mOccludedGroups.insert(group); } } -void LLVOCachePartition::processOccluders(LLCamera* camera) +void LLVOCachePartition::processOccluders(LLCamera* camera, const LLVector3* region_agent) { for(std::set<LLOcclusionCullingGroup*>::iterator iter = mOccludedGroups.begin(); iter != mOccludedGroups.end(); ++iter) { LLOcclusionCullingGroup* group = *iter; - group->doOcclusion(camera); + group->doOcclusion(camera, region_agent); group->clearOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION); } } |