summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorTofu Buzzard <no-email>2011-03-04 14:15:52 -0800
committerTofu Buzzard <no-email>2011-03-04 14:15:52 -0800
commit59c3af8b40a6857871b81da85ca41554929373f2 (patch)
tree1a9c97c5ed38886eed3c7efc83701aaedee609d4 /indra/newview/llvovolume.cpp
parentcc61ad696e6947111f61453daf9840415045c64f (diff)
parent6a86c65e46f92f1a955d31e2d0b9d7ffcd171134 (diff)
merge
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 66263412ec..7601b68c5f 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1218,7 +1218,10 @@ BOOL LLVOVolume::calcLOD()
distance = mDrawable->mDistanceWRTCamera;
radius = getVolume()->mLODScaleBias.scaledVec(getScale()).length();
}
-
+
+ //hold onto unmodified distance for debugging
+ F32 debug_distance = distance;
+
distance *= sDistanceFactor;
F32 rampDist = LLVOVolume::sLODFactor * 2;
@@ -1237,6 +1240,12 @@ BOOL LLVOVolume::calcLOD()
cur_detail = computeLODDetail(llround(distance, 0.01f),
llround(radius, 0.01f));
+
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_LOD_INFO))
+ {
+ setDebugText(llformat("%.2f:%.2f, %d", debug_distance, radius, cur_detail));
+ }
+
if (cur_detail != mLOD)
{
mAppAngle = llround((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);