summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lldrawable.cpp9
-rwxr-xr-xindra/newview/llviewermenu.cpp4
-rw-r--r--indra/newview/llvovolume.cpp11
-rwxr-xr-xindra/newview/pipeline.cpp2
-rw-r--r--indra/newview/pipeline.h1
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml10
6 files changed, 34 insertions, 3 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index fe743e7451..bdc12ec0e3 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -708,7 +708,14 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
LLVOVolume* volume = getVOVolume();
if (volume)
{
- pos.set(getPositionGroup().getF32ptr());
+ if (getSpatialGroup())
+ {
+ pos.set(getPositionGroup().getF32ptr());
+ }
+ else
+ {
+ pos = getPositionAgent();
+ }
if (isState(LLDrawable::HAS_ALPHA))
{
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 37aa080228..99c7d4b8c9 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -937,6 +937,10 @@ U32 info_display_from_string(std::string info_display)
{
return LLPipeline::RENDER_DEBUG_FACE_AREA;
}
+ else if ("lod info" == info_display)
+ {
+ return LLPipeline::RENDER_DEBUG_LOD_INFO;
+ }
else if ("build queue" == info_display)
{
return LLPipeline::RENDER_DEBUG_BUILD_QUEUE;
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);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 9eaf515c65..ba597d62bf 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -2742,7 +2742,7 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)
{
- if (drawablep->isVisible())
+ //if (drawablep->isVisible()) isVisible() check here is redundant, if it wasn't visible, it wouldn't be here
{
if (!drawablep->isActive())
{
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 32ac93388d..be58af947c 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -447,6 +447,7 @@ public:
RENDER_DEBUG_UPDATE_TYPE = 0x0800000,
RENDER_DEBUG_PHYSICS_SHAPES = 0x1000000,
RENDER_DEBUG_NORMALS = 0x2000000,
+ RENDER_DEBUG_LOD_INFO = 0x4000000,
};
public:
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 0a6be2899b..38e9165613 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2278,6 +2278,16 @@
parameter="face area" />
</menu_item_check>
<menu_item_check
+ label="LOD Info"
+ name="LOD Info">
+ <menu_item_check.on_check
+ function="Advanced.CheckInfoDisplay"
+ parameter="lod info" />
+ <menu_item_check.on_click
+ function="Advanced.ToggleInfoDisplay"
+ parameter="lod info" />
+ </menu_item_check>
+ <menu_item_check
label="Build Queue"
name="Build Queue">
<menu_item_check.on_check