summaryrefslogtreecommitdiff
path: root/indra/newview/llvocache.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-08-07 22:53:27 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-08-07 22:53:27 -0600
commita2c7b0485576c6bb92f6d0eddc762f5e37d5caac (patch)
tree400b50815c54740834a2a2d0810a5f72e712af70 /indra/newview/llvocache.cpp
parentf6a342438c59548276f0ee9f3033b47229d5d6d3 (diff)
more fix for SH-4397: Object cache occlusion culling results are not always correct
Diffstat (limited to 'indra/newview/llvocache.cpp')
-rwxr-xr-xindra/newview/llvocache.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 11f31fcb9a..82485d7fdc 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -495,7 +495,7 @@ public:
mPartition(part)
{
mLocalShift = shift;
- mUseObjectCacheOcclusion = (use_object_cache_occlusion && LLPipeline::sUseOcclusion);
+ mUseObjectCacheOcclusion = use_object_cache_occlusion;
}
virtual bool earlyFail(LLviewerOctreeGroup* base_group)
@@ -586,10 +586,10 @@ private:
bool mUseObjectCacheOcclusion;
};
-S32 LLVOCachePartition::cull(LLCamera &camera)
+S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
{
static LLCachedControl<bool> use_object_cache_occlusion(gSavedSettings,"UseObjectCacheOcclusion");
-
+
if(!LLViewerRegion::sVOCacheCullingEnabled)
{
return 0;
@@ -601,7 +601,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera)
LLVector3 region_agent = mRegionp->getOriginAgent();
camera.calcRegionFrustumPlanes(region_agent);
- LLVOCacheOctreeCull culler(&camera, mRegionp, region_agent, use_object_cache_occlusion, this);
+ LLVOCacheOctreeCull culler(&camera, mRegionp, region_agent, do_occlusion && use_object_cache_occlusion, this);
culler.traverse(mOctree);
return 0;