summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2011-03-22 20:39:31 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2011-03-22 20:39:31 -0400
commit29dc641fbe7ab77f77fe19e2e7976980f0649b5b (patch)
tree4190aef1ee4b0465e55bfa91d22f74db318fff9c /indra/newview/llvovolume.cpp
parent955b727550e8595fd67c55775d8f0fe249826277 (diff)
initial effort to enable a debug display to show render complexity.
Using for internal demo, will get it code reviewed if it merges in.
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index e2d1850e58..7c772ce835 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -87,6 +87,8 @@ F32 LLVOVolume::sLODFactor = 1.f;
F32 LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop
F32 LLVOVolume::sDistanceFactor = 1.0f;
S32 LLVOVolume::sNumLODChanges = 0;
+S32 LLVOVolume::mRenderComplexity_last = 0;
+S32 LLVOVolume::mRenderComplexity_current = 0;
LLPointer<LLObjectMediaDataClient> LLVOVolume::sObjectMediaClient = NULL;
LLPointer<LLObjectMediaNavigateClient> LLVOVolume::sObjectMediaNavigateClient = NULL;
@@ -3206,6 +3208,11 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
shame += num_particles * part_size * ARC_PARTICLE_COST;
}
+ if (shame > mRenderComplexity_current)
+ {
+ mRenderComplexity_current = (S32)shame;
+ }
+
return (U32)shame;
}
@@ -3223,7 +3230,14 @@ F32 LLVOVolume::getStreamingCost()
return 0.f;
}
-U32 LLVOVolume::getTriangleCount()
+//static
+void LLVOVolume::updateRenderComplexity()
+{
+ mRenderComplexity_last = mRenderComplexity_current;
+ mRenderComplexity_current = 0;
+}
+
+U32 LLVOVolume::getTriangleCount() const
{
U32 count = 0;
LLVolume* volume = getVolume();
@@ -4068,7 +4082,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if ( bindCnt > 0 )
{
const int jointCnt = pSkinData->mJointNames.size();
- const int pelvisZOffset = pSkinData->mPelvisOffset;
+ const int pelvisZOffset = (int)pSkinData->mPelvisOffset;
bool fullRig = (jointCnt>=20) ? true : false;
if ( fullRig )
{