summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-08-21 17:24:28 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-08-21 17:24:28 -0600
commitea37dd4acc8687ae28902b8a5f7d0841314c4849 (patch)
treed2ee3d9cd87749c6d9b3814e7808cd05b9280408 /indra/newview
parent37626bb4a29c39b35fe63971928b76d11faafeb3 (diff)
parent31bf481a7b5f079d95be6a44a45502bb957e0941 (diff)
Automated merge with http://bitbucket.org/lindenlab/viewer-interesting
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvieweroctree.h1
-rwxr-xr-xindra/newview/llvocache.cpp15
-rwxr-xr-xindra/newview/llvocache.h7
3 files changed, 17 insertions, 6 deletions
diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h
index 7fdb5661d8..0cd0206223 100644
--- a/indra/newview/llvieweroctree.h
+++ b/indra/newview/llvieweroctree.h
@@ -327,6 +327,7 @@ public:
//virtual
BOOL isRecentlyVisible() const;
+ LLViewerOctreePartition* getSpatialPartition()const {return mSpatialPartition;}
static U32 getNewOcclusionQueryObjectName();
static void releaseOcclusionQueryObjectName(U32 name);
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 838ac353d1..3bd71e2648 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -261,6 +261,12 @@ void LLVOCacheEntry::addChild(LLVOCacheEntry* entry)
if(getEntry() != NULL && isState(INACTIVE))
{
updateParentBoundingInfo(entry);
+ if(getGroup())
+ {
+ LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)getGroup();
+ group->unbound();
+ ((LLVOCachePartition*)group->getSpatialPartition())->setDirty();
+ }
}
}
@@ -479,12 +485,17 @@ LLVOCachePartition::LLVOCachePartition(LLViewerRegion* regionp)
new LLOcclusionCullingGroup(mOctree, this);
}
+void LLVOCachePartition::setDirty()
+{
+ mDirty = TRUE;
+}
+
void LLVOCachePartition::addEntry(LLViewerOctreeEntry* entry)
{
llassert(entry->hasVOCacheEntry());
mOctree->insert(entry);
- mDirty = TRUE;
+ setDirty();
}
void LLVOCachePartition::removeEntry(LLViewerOctreeEntry* entry)
@@ -615,7 +626,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
}
((LLviewerOctreeGroup*)mOctree->getListener(0))->rebound();
- mCullHistory[LLViewerCamera::sCurCameraID] <<= 2;
+ mCullHistory[LLViewerCamera::sCurCameraID] <<= 1;
//localize the camera
LLVector3 region_agent = mRegionp->getOriginAgent();
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index c448b97b80..71be9de759 100755
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -162,14 +162,13 @@ public:
/*virtual*/ S32 cull(LLCamera &camera, bool do_occlusion);
void addOccluders(LLviewerOctreeGroup* gp);
void resetOccluders();
-
- static LLTrace::MemStatHandle sMemStat;
-
-public:
void processOccluders(LLCamera* camera);
+
+ void setDirty();
public:
static BOOL sNeedsOcclusionCheck;
+ static LLTrace::MemStatHandle sMemStat;
private:
BOOL mDirty;