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/llviewerwindow.cpp | |
parent | 1aecac62eb88125546057be2a2a70a6b2eba1a57 (diff) |
SH-477 Better mesh streaming cost estimation.
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 39ef56d156..141ade8079 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -493,6 +493,10 @@ public: { F32 cost = 0.f; S32 count = 0; + S32 object_count = 0; + S32 total_bytes = 0; + S32 visible_bytes = 0; + const char* label = "Region"; if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 0) { //region @@ -506,8 +510,13 @@ public: object->getRegion() == region && object->getVolume()) { - cost += object->getStreamingCost(); + object_count++; + S32 bytes = 0; + S32 visible = 0; + cost += object->getStreamingCost(&bytes, &visible); count += object->getTriangleCount(); + total_bytes += bytes; + visible_bytes += visible; } } } @@ -515,12 +524,16 @@ public: else { label = "Selection"; - cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectStreamingCost(); + cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectStreamingCost(&total_bytes, &visible_bytes); count = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectTriangleCount(); + object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); } - addText(xpos,ypos, llformat("%s streaming cost: %.1f (%.1f KTris)", - label, cost, count/1000.f)); + addText(xpos,ypos, llformat("%s streaming cost: %.1f", label, cost)); + ypos += y_inc; + + addText(xpos, ypos, llformat(" %.1f KTris, %.1f/%.1f KB, %d objects", + count/1024.f, visible_bytes/1024.f, total_bytes/1024.f, object_count)); ypos += y_inc; } |