summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2014-12-03 10:13:50 -0500
committerOz Linden <oz@lindenlab.com>2014-12-03 10:13:50 -0500
commit9785a88ba447087fb547794430f24d7513909cbe (patch)
tree1c3cf93a869c07e11bc01e45fe0e2b5651a96d38 /indra/newview/llvoavatar.cpp
parent6c534dff5f30e503d6f5b63cdeeb4c0e2a29ae28 (diff)
further improvements to avatar render info display and logging of associated server messages
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 3a83943209..816b2c8b67 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7948,7 +7948,6 @@ void LLVOAvatar::getImpostorValues(LLVector4a* extents, LLVector3& angle, F32& d
angle.mV[2] = da;
}
-
void LLVOAvatar::idleUpdateRenderCost()
{
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_AVATAR_DRAW_INFO))
@@ -7962,30 +7961,35 @@ void LLVOAvatar::idleUpdateRenderCost()
if ( !mText )
{
initDebugTextHud();
+ mText->setFadeDistance(15.0, 5.0); // limit clutter in large crowds
}
else
{
mText->clearString(); // clear debug text
}
- static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0);
- info_line = llformat("%.1f KB", mAttachmentGeometryBytes/1024.f);
- if (max_attachment_bytes != 0) // zero means don't care, so don't bother coloring based on this
+ calculateUpdateRenderCost(); // Update mVisualComplexity if needed
+
+ static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAutoMuteRenderWeightLimit", 0);
+ info_line = llformat("%d arc", mVisualComplexity);
+
+ if (max_render_cost != 0) // zero means don't care, so don't bother coloring based on this
{
- green_level = 1.f-llclamp(((F32) mAttachmentGeometryBytes-(F32)max_attachment_bytes)/(F32)max_attachment_bytes, 0.f, 1.f);
- red_level = llmin((F32) mAttachmentGeometryBytes/(F32)max_attachment_bytes, 1.f);
+ green_level = 1.f-llclamp(((F32) mVisualComplexity-(F32)max_render_cost)/(F32)max_render_cost, 0.f, 1.f);
+ red_level = llmin((F32) mVisualComplexity/(F32)max_render_cost, 1.f);
info_color.set(red_level, green_level, 0.0, 1.0);
- info_style = ( mAttachmentGeometryBytes > max_attachment_bytes
+ info_style = ( mVisualComplexity > max_render_cost
? LLFontGL::BOLD : LLFontGL::NORMAL );
+
}
else
{
- info_color.setToWhite();
+ info_color.set(LLColor4::grey);
info_style = LLFontGL::NORMAL;
}
- LL_DEBUGS() << "adding max bytes " << info_line << LL_ENDL;
- mText->addLine(info_line, info_color);
-
+ LL_DEBUGS() << "adding max cost " << info_line << LL_ENDL;
+ mText->addLine(info_line, info_color, info_style);
+
static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 0);
info_line = llformat("%.2f m^2", mAttachmentSurfaceArea);
@@ -7994,40 +7998,36 @@ void LLVOAvatar::idleUpdateRenderCost()
green_level = 1.f-llclamp((mAttachmentSurfaceArea-max_attachment_area)/max_attachment_area, 0.f, 1.f);
red_level = llmin(mAttachmentSurfaceArea/max_attachment_area, 1.f);
info_color.set(red_level, green_level, 0.0, 1.0);
- info_style = ( max_attachment_area > mAttachmentSurfaceArea
+ info_style = ( mAttachmentSurfaceArea > max_attachment_area
? LLFontGL::BOLD : LLFontGL::NORMAL );
}
else
{
- info_color.setToWhite();
+ info_color.set(LLColor4::grey);
info_style = LLFontGL::NORMAL;
}
LL_DEBUGS() << "adding max area " << info_line << LL_ENDL;
mText->addLine(info_line, info_color, info_style);
- calculateUpdateRenderCost(); // Update mVisualComplexity if needed
-
- static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAutoMuteRenderWeightLimit", 0);
- info_line = llformat("%d arc", mVisualComplexity);
-
- if (max_render_cost != 0) // zero means don't care, so don't bother coloring based on this
+ static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0);
+ info_line = llformat("%.1f KB", mAttachmentGeometryBytes/1024.f);
+ if (max_attachment_bytes != 0) // zero means don't care, so don't bother coloring based on this
{
- green_level = 1.f-llclamp(((F32) mVisualComplexity-(F32)max_render_cost)/(F32)max_render_cost, 0.f, 1.f);
- red_level = llmin((F32) mVisualComplexity/(F32)max_render_cost, 1.f);
+ green_level = 1.f-llclamp(((F32) mAttachmentGeometryBytes-(F32)max_attachment_bytes)/(F32)max_attachment_bytes, 0.f, 1.f);
+ red_level = llmin((F32) mAttachmentGeometryBytes/(F32)max_attachment_bytes, 1.f);
info_color.set(red_level, green_level, 0.0, 1.0);
- info_style = ( mVisualComplexity > max_render_cost
+ info_style = ( mAttachmentGeometryBytes > max_attachment_bytes
? LLFontGL::BOLD : LLFontGL::NORMAL );
-
}
else
{
- info_color.setToWhite();
+ info_color.set(LLColor4::grey);
info_style = LLFontGL::NORMAL;
}
- LL_DEBUGS() << "adding max cost " << info_line << LL_ENDL;
- mText->addLine(info_line, info_color, info_style);
-
+ LL_DEBUGS() << "adding max bytes " << info_line << LL_ENDL;
+ mText->addLine(info_line, info_color);
+
updateText(); // corrects position
}
}