summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-09-20 11:46:51 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-09-20 11:46:51 -0600
commit3eb226275b6c66ddf5b4aa4d40f9e8c855fb4a0f (patch)
treee131570cc212fe317eb0d5c9474a79e12aebd3ae /indra
parentba4f64ed7ad64deeed5f7109f33c796bae0c4423 (diff)
more fix for SH-4501: Interesting: Occluded objects do not appear when Occluder object is deleted.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llvocache.cpp7
-rwxr-xr-xindra/newview/llvocache.h1
2 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index e3a3f0510b..dfc9ee57d8 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -492,6 +492,7 @@ LLVOCachePartition::LLVOCachePartition(LLViewerRegion* regionp)
mRegionp = regionp;
mPartitionType = LLViewerRegion::PARTITION_VO_CACHE;
mBackSlectionEnabled = -1;
+ mIdleHash = 0;
for(S32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
{
@@ -721,17 +722,15 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
if(!mCullHistory[LLViewerCamera::sCurCameraID] && LLViewerRegion::isViewerCameraStatic())
{
- static U32 hash = 0;
-
U32 seed = llmax(mLODPeriod >> 1, (U32)4);
if(LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)
{
if(!(LLViewerOctreeEntryData::getCurrentFrame() % seed))
{
- hash = (hash + 1) % seed;
+ mIdleHash = (mIdleHash + 1) % seed;
}
}
- if(LLViewerOctreeEntryData::getCurrentFrame() % seed != hash)
+ if(LLViewerOctreeEntryData::getCurrentFrame() % seed != mIdleHash)
{
selectBackObjects(camera);//process back objects selection
return 0; //nothing changed, reduce frequency of culling
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index bab3be26b8..867f9ab93c 100755
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -184,6 +184,7 @@ private:
std::set<LLOcclusionCullingGroup*> mOccludedGroups;
S32 mBackSlectionEnabled; //enable to select back objects if > 0.
+ U32 mIdleHash;
};
//