From 96c6200f7271cadec83f8d55e30e3b4713c3f939 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 25 Jan 2011 15:29:45 -0600 Subject: SH-390 Fix for bad occlusion culling of some mesh objects. --- indra/newview/llvovolume.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 5277e073a3..e3b5e613d9 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1075,7 +1075,6 @@ void LLVOVolume::notifyMeshLoaded() { mSculptChanged = TRUE; gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, TRUE); - dirtySpatialGroup(TRUE); } // sculpt replaces generate() for sculpted surfaces @@ -1608,6 +1607,17 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) regenFaces(); } genBBoxes(FALSE); + + if (mSculptChanged) + { //changes in sculpt maps can thrash an object bounding box without + //triggering a spatial group bounding box update -- force spatial group + //to update bounding boxes + LLSpatialGroup* group = mDrawable->getSpatialGroup(); + if (group) + { + group->unbound(); + } + } } } } @@ -1632,7 +1642,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) mLODChanged = FALSE; mSculptChanged = FALSE; mFaceMappingChanged = FALSE; - + return LLViewerObject::updateGeometry(drawable); } -- cgit v1.2.3