diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-10-01 10:57:39 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-10-01 10:57:39 -0600 |
commit | 1aa9ad575488eb1f808f3bfcb5f0ffa1e8e95591 (patch) | |
tree | 1507242064470c94577be7757e72e916b15156b8 /indra | |
parent | a96da325564f4e9769e85ad006f98a4ac08d4a47 (diff) | |
parent | a5a1b81af28b16406687df3550730a436155589f (diff) |
Automated merge with http://bitbucket.org/lindenlab/viewer-interesting
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llvieweroctree.cpp | 20 | ||||
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 3 |
2 files changed, 20 insertions, 3 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index e1684c19df..e8eba43242 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -809,7 +809,14 @@ class LLSpatialSetOcclusionState : public OctreeTraveler public: U32 mState; LLSpatialSetOcclusionState(U32 state) : mState(state) { } - virtual void visit(const OctreeNode* branch) { ((LLOcclusionCullingGroup*) branch->getListener(0))->setOcclusionState(mState); } + virtual void visit(const OctreeNode* branch) + { + LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)branch->getListener(0); + if(group) + { + group->setOcclusionState(mState); + } + } }; class LLSpatialSetOcclusionStateDiff : public LLSpatialSetOcclusionState @@ -821,7 +828,7 @@ public: { LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*) n->getListener(0); - if (!group->isOcclusionState(mState)) + if (group && !group->isOcclusionState(mState)) { OctreeTraveler::traverse(n); } @@ -945,7 +952,14 @@ public: U32 mState; LLSpatialClearOcclusionState(U32 state) : mState(state) { } - virtual void visit(const OctreeNode* branch) { ((LLOcclusionCullingGroup*) branch->getListener(0))->clearOcclusionState(mState); } + virtual void visit(const OctreeNode* branch) + { + LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)branch->getListener(0); + if(group) + { + group->clearOcclusionState(mState); + } + } }; class LLSpatialClearOcclusionStateDiff : public LLSpatialClearOcclusionState diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 18232e75c9..0c2c2365c7 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1183,6 +1183,9 @@ void LLViewerRegion::clearCachedVisibleObjects() mImpl->mWaitingList.clear(); mImpl->mVisibleGroups.clear(); + //reset all occluders + mImpl->mVOCachePartition->resetOccluders(); + //clean visible entries for(LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mVisibleEntries.begin(); iter != mImpl->mVisibleEntries.end();) { |