diff options
author | Dave Parks <davep@lindenlab.com> | 2011-03-30 18:38:22 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-03-30 18:38:22 -0500 |
commit | 6b9a2d24cce8efaa72c2fd60655998844394312d (patch) | |
tree | 77438ba1c0e742c2acf7372b968f32368290fa8a /indra/newview/llselectmgr.cpp | |
parent | 1aecac62eb88125546057be2a2a70a6b2eba1a57 (diff) |
SH-477 Better mesh streaming cost estimation.
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index b139ba361e..78ffc7908d 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6374,7 +6374,7 @@ BOOL LLObjectSelection::isEmpty() const //----------------------------------------------------------------------------- // getObjectCount() - returns number of non null objects //----------------------------------------------------------------------------- -S32 LLObjectSelection::getObjectCount(BOOL mesh_adjust) +S32 LLObjectSelection::getObjectCount() { cleanupNodes(); S32 count = mList.size(); @@ -6478,7 +6478,7 @@ F32 LLObjectSelection::getSelectedLinksetPhysicsCost() return cost; } -F32 LLObjectSelection::getSelectedObjectStreamingCost() +F32 LLObjectSelection::getSelectedObjectStreamingCost(S32* total_bytes, S32* visible_bytes) { F32 cost = 0.f; for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter) @@ -6488,7 +6488,19 @@ F32 LLObjectSelection::getSelectedObjectStreamingCost() if (object) { - cost += object->getStreamingCost(); + S32 bytes = 0; + S32 visible = 0; + cost += object->getStreamingCost(&bytes, &visible); + + if (total_bytes) + { + *total_bytes += bytes; + } + + if (visible_bytes) + { + *visible_bytes += visible; + } } } |