summaryrefslogtreecommitdiff
path: root/indra/newview/llvieweroctree.cpp
diff options
context:
space:
mode:
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)
{