summaryrefslogtreecommitdiff
path: root/indra/newview/llvieweroctree.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-08-05 14:48:26 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-08-05 14:48:26 -0600
commit576b9339977f50edb11a799d7a274610263f9fdc (patch)
tree873dbceba5d12cd23736b599ee76b87eaa9d247e /indra/newview/llvieweroctree.cpp
parent3059b59b619123caf5cc3137ab0b983c28a2962b (diff)
fix for SH-4397: Object cache occlusion culling results are not always correct
Diffstat (limited to 'indra/newview/llvieweroctree.cpp')
-rw-r--r--indra/newview/llvieweroctree.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index bba3d26e09..9b8a3c9269 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -853,6 +853,12 @@ BOOL LLOcclusionCullingGroup::needsUpdate()
return (LLDrawable::getCurrentFrame() % mSpatialPartition->mLODPeriod == mLODHash) ? TRUE : FALSE;
}
+BOOL LLOcclusionCullingGroup::isRecentlyVisible() const
+{
+ const S32 MIN_VIS_FRAME_RANGE = 2;
+ return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < MIN_VIS_FRAME_RANGE ;
+}
+
//virtual
void LLOcclusionCullingGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
{