summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-03-11 16:39:03 -0600
committerDave Parks <davep@lindenlab.com>2011-03-11 16:39:03 -0600
commitbcc54d496490c501bb212466ff1bc5a143b12a4f (patch)
tree7a8d77896db9ffc00b844f9bc78e1437db280543 /indra/newview/llviewerwindow.cpp
parente3e12bc3df13af25f921d47852edff3254364282 (diff)
SH-477 Put estimated streaming cost back in the debug display -- use newfangled equation.
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;