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 5bd0a95387..ce8eef7d86 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -437,6 +437,7 @@ LLViewerOctreeGroup::~LLViewerOctreeGroup()
LLViewerOctreeGroup::LLViewerOctreeGroup(OctreeNode* node)
: LLTrace::MemTrackable<LLViewerOctreeGroup, 16>("LLViewerOctreeGroup"),
mOctreeNode(node),
+ mAnyVisible(0),
mState(CLEAN)
{
LLVector4a tmp;
@@ -737,6 +738,7 @@ BOOL LLViewerOctreeGroup::isRecentlyVisible() const
void LLViewerOctreeGroup::setVisible()
{
mVisible[LLViewerCamera::sCurCameraID] = LLViewerOctreeEntryData::getCurrentFrame();
+ mAnyVisible = LLViewerOctreeEntryData::getCurrentFrame();
}
void LLViewerOctreeGroup::checkStates()
@@ -873,6 +875,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)
{