diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-09-12 16:41:48 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-09-12 16:41:48 -0600 |
commit | 75f5efff9bc29380bae5a3febd5e2bd169aaff79 (patch) | |
tree | 8561fd94629488c247395745585cacc286225bd0 | |
parent | 420a1af0c86113a7db291022373b69c2b8810c7c (diff) | |
parent | 605060ea022670f4ff6f8850f79495032095b58e (diff) |
Automated merge with http://bitbucket.org/lindenlab/viewer-interesting
-rw-r--r-- | indra/newview/llvieweroctree.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llvieweroctree.h | 2 | ||||
-rwxr-xr-x | indra/newview/llvocache.cpp | 11 |
3 files changed, 10 insertions, 11 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 1e01c0fdef..2457f15b50 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -1132,7 +1132,7 @@ static LLTrace::TimeBlock FTM_OCCLUSION_SET_BUFFER("Set Buffer"); static LLTrace::TimeBlock FTM_OCCLUSION_DRAW_WATER("Draw Water"); static LLTrace::TimeBlock FTM_OCCLUSION_DRAW("Draw"); -void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* region_agent) +void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* shift) { if (mSpatialPartition->isOcclusionEnabled() && LLPipeline::sUseOcclusion > 1) { @@ -1140,11 +1140,9 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg LLVector4a bounds[2]; bounds[0] = mBounds[0]; bounds[1] = mBounds[1]; - if(region_agent != NULL) + if(shift != NULL) { - LLVector4a shift((*region_agent)[0], (*region_agent)[1], (*region_agent)[2]); - bounds[0].sub(shift); - bounds[1].sub(shift); + bounds[0].add(*shift); } // Don't cull hole/edge water, unless we have the GL_ARB_depth_clamp extension diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h index 97dc1d4a0a..bc3c7cbfa2 100644 --- a/indra/newview/llvieweroctree.h +++ b/indra/newview/llvieweroctree.h @@ -314,7 +314,7 @@ public: void setOcclusionState(U32 state, S32 mode = STATE_MODE_SINGLE); void clearOcclusionState(U32 state, S32 mode = STATE_MODE_SINGLE); void checkOcclusion(); //read back last occlusion query (if any) - void doOcclusion(LLCamera* camera, const LLVector3* region_agent = NULL); //issue occlusion query + void doOcclusion(LLCamera* camera, const LLVector4a* shift = NULL); //issue occlusion query BOOL isOcclusionState(U32 state) const { return mOcclusionState[LLViewerCamera::sCurCameraID] & state ? TRUE : FALSE; } BOOL needsUpdate(); diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index f0c9546651..c2b09246e9 100755 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -545,10 +545,10 @@ public: base_group->getOctreeNode()->getParent()) //never occlusion cull the root node { LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)base_group; - if(group->needsUpdate())//needs to issue new occlusion culling check. + if(group->needsUpdate()) { - mPartition->addOccluders(group); - return true; + //needs to issue new occlusion culling check, perform view culling check first. + return false; } group->checkOcclusion(); @@ -601,7 +601,7 @@ public: } LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)base_group; - if(!group->isRecentlyVisible())//needs to issue new occlusion culling check. + if(group->needsUpdate() || !group->isRecentlyVisible())//needs to issue new occlusion culling check. { mPartition->addOccluders(group); group->setVisible(); @@ -693,10 +693,11 @@ void LLVOCachePartition::processOccluders(LLCamera* camera) } LLVector3 region_agent = mRegionp->getOriginAgent(); + LLVector4a shift(region_agent[0], region_agent[1], region_agent[2]); for(std::set<LLOcclusionCullingGroup*>::iterator iter = mOccludedGroups.begin(); iter != mOccludedGroups.end(); ++iter) { LLOcclusionCullingGroup* group = *iter; - group->doOcclusion(camera, ®ion_agent); + group->doOcclusion(camera, &shift); } } |