summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2022-07-01 14:52:31 -0700
committerCosmic Linden <cosmic@lindenlab.com>2022-07-01 15:18:30 -0700
commit65fb1c26f1266c68b1c6c663c49e25d9a5d62028 (patch)
treeec2536b7672766adafcb04ca1a3a157109ff38b8 /indra/newview
parent21d581ed389fe8a23967332b77e213403a51f908 (diff)
SL-17448: Be more thorough about generating bounding boxes that don't affect the octree
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvovolume.cpp14
-rw-r--r--indra/newview/llvovolume.h2
2 files changed, 7 insertions, 9 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 074ad35af4..d86e135116 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1682,7 +1682,7 @@ void LLVOVolume::regenFaces()
}
}
-BOOL LLVOVolume::genBBoxes(BOOL force_global)
+BOOL LLVOVolume::genBBoxes(BOOL force_global, BOOL should_update_octree_bounds)
{
LL_PROFILE_ZONE_SCOPED;
BOOL res = TRUE;
@@ -1760,7 +1760,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global)
if (any_valid_boxes)
{
- if (rebuild)
+ if (rebuild && should_update_octree_bounds)
{
//get the Avatar associated with this object if it's rigged
LLVOAvatar* avatar = nullptr;
@@ -2066,12 +2066,10 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
// All it did was move or we changed the texture coordinate offset
}
- if (should_update_octree_bounds || !mDrawable->getSpatialExtents()->isFinite3())
- {
- // Generate bounding boxes if needed, and update the object's size in the
- // octree
- genBBoxes(FALSE);
- }
+ should_update_octree_bounds = should_update_octree_bounds || !mDrawable->getSpatialExtents()->isFinite3();
+ // Generate bounding boxes if needed, and update the object's size in the
+ // octree
+ genBBoxes(FALSE, should_update_octree_bounds);
// Update face flags
updateFaceFlags();
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 8009c92702..ce6c155883 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -233,7 +233,7 @@ public:
void updateFaceFlags();
void regenFaces();
- BOOL genBBoxes(BOOL force_global);
+ BOOL genBBoxes(BOOL force_global, BOOL should_update_octree_bounds = FALSE);
void preRebuild();
virtual void updateSpatialExtents(LLVector4a& min, LLVector4a& max);
virtual F32 getBinRadius();