summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorTofu Buzzard <no-email>2011-03-11 19:18:34 -0800
committerTofu Buzzard <no-email>2011-03-11 19:18:34 -0800
commit0b51a0cc63b5d6cd848189bf3fc0d26e987c62fb (patch)
tree5f6ab56dc3eeeedd27099a5cd5a75a72b9fae059 /indra/newview/llviewerwindow.cpp
parentc1f01016cfc4dd908c1f73b815cddb1b6b35194d (diff)
parent41f057b693d1b2b1b1916e3a126dc622a943e5d8 (diff)
merge
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp40
1 files changed, 36 insertions, 4 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index f665f39e9c..5d91a0045a 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -489,6 +489,42 @@ public:
ypos += y_inc;
}
+ //show streaming cost/triangle count of known prims in current region OR selection
+ {
+ F32 cost = 0.f;
+ S32 count = 0;
+ const char* label = "Region";
+ if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 0)
+ { //region
+ LLViewerRegion* region = gAgent.getRegion();
+ if (region)
+ {
+ for (U32 i = 0; i < gObjectList.getNumObjects(); ++i)
+ {
+ LLViewerObject* object = gObjectList.getObject(i);
+ if (object &&
+ object->getRegion() == region &&
+ object->getVolume())
+ {
+ cost += object->getStreamingCost();
+ count += object->getTriangleCount();
+ }
+ }
+ }
+ }
+ else
+ {
+ label = "Selection";
+ cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectStreamingCost();
+ count = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectTriangleCount();
+ }
+
+ addText(xpos,ypos, llformat("%s streaming cost: %.1f (%.1f KTris)",
+ label, cost, count/1000.f));
+ ypos += y_inc;
+
+ }
+
addText(xpos, ypos, llformat("%d MB Vertex Data", LLVertexBuffer::sAllocatedBytes/(1024*1024)));
ypos += y_inc;
@@ -572,10 +608,6 @@ public:
ypos += y_inc;
}
- addText(xpos, ypos, llformat("Selection Triangle Count: %.3f Ktris ", LLSelectMgr::getInstance()->getSelection()->getSelectedObjectTriangleCount()/1000.f));
-
- ypos += y_inc;
-
LLVertexBuffer::sBindCount = LLImageGL::sBindCount =
LLVertexBuffer::sSetCount = LLImageGL::sUniqueCount =
gPipeline.mNumVisibleNodes = LLPipeline::sVisibleLightCount = 0;