summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-08-03 14:23:02 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-08-03 14:23:02 +0100
commita57170724344842e26b8cd0fa4a47c24efa834c5 (patch)
tree355331bdd08d67b600db68812d8048688c4e9f9f /indra/newview/llvovolume.cpp
parent912c8faf55a4d391f69eb18d4fda5a85a70de6ca (diff)
SL-731 - render metadata includes triangle count, triangle and vertex count included with debug text for control avatar
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp27
1 files changed, 24 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index c0814c5695..04e2827182 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1295,14 +1295,35 @@ BOOL LLVOVolume::calcLOD()
distance *= F_PI/3.f;
cur_detail = computeLODDetail(ll_round(distance, 0.01f),
- ll_round(radius, 0.01f));
+ ll_round(radius, 0.01f));
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TRIANGLE_COUNT) && mDrawable->getFace(0))
+ {
+ if (isRootEdit() && getChildren().size()>0)
+ {
+ S32 total_tris = getTriangleCount();
+ LLViewerObject::const_child_list_t& child_list = getChildren();
+ for (LLViewerObject::const_child_list_t::const_iterator iter = child_list.begin();
+ iter != child_list.end(); ++iter)
+ {
+ LLViewerObject* childp = *iter;
+ LLVOVolume *child_volp = dynamic_cast<LLVOVolume*>(childp);
+ total_tris += child_volp->getTriangleCount();
+ }
+ setDebugText(llformat("TRIS %d TOTAL %d", getTriangleCount(), total_tris));
+ }
+ else
+ {
+ setDebugText(llformat("TRIS %d", getTriangleCount()));
+ }
+
+ }
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_LOD_INFO) &&
mDrawable->getFace(0))
{
- // This is a display for LODs. If you need the texture index, put it somewhere else!
- setDebugText(llformat("lod %d", cur_detail));
+ // This is a debug display for LODs. Please don't put the texture index here.
+ setDebugText(llformat("%d", cur_detail));
}
if (cur_detail != mLOD)