summaryrefslogtreecommitdiff
path: root/indra/newview/llvieweroctree.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-10-04 11:09:29 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-10-04 11:09:29 -0600
commitb0aa408a665ce61ff374f99e421812482fe53848 (patch)
treed5c29a12e99268377659d3f392a9c7a0e24b33df /indra/newview/llvieweroctree.cpp
parent9ae025f8ee8688b25678a243ba19f1398de08060 (diff)
fix for SH-4544: Interesting: Shadows from platforms above the camera flicker
Diffstat (limited to 'indra/newview/llvieweroctree.cpp')
-rw-r--r--indra/newview/llvieweroctree.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index e8eba43242..56f10aba71 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -435,6 +435,7 @@ LLviewerOctreeGroup::~LLviewerOctreeGroup()
LLviewerOctreeGroup::LLviewerOctreeGroup(OctreeNode* node) :
mOctreeNode(node),
+ mAnyVisible(0),
mState(CLEAN)
{
LLVector4a tmp;
@@ -735,6 +736,7 @@ BOOL LLviewerOctreeGroup::isRecentlyVisible() const
void LLviewerOctreeGroup::setVisible()
{
mVisible[LLViewerCamera::sCurCameraID] = LLViewerOctreeEntryData::getCurrentFrame();
+ mAnyVisible = LLViewerOctreeEntryData::getCurrentFrame();
}
void LLviewerOctreeGroup::checkStates()
@@ -871,6 +873,12 @@ BOOL LLOcclusionCullingGroup::isRecentlyVisible() const
return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < MIN_VIS_FRAME_RANGE ;
}
+BOOL LLOcclusionCullingGroup::isAnyRecentlyVisible() const
+{
+ const S32 MIN_VIS_FRAME_RANGE = 2;
+ return (LLDrawable::getCurrentFrame() - mAnyVisible) < MIN_VIS_FRAME_RANGE ;
+}
+
//virtual
void LLOcclusionCullingGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
{