summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-03-07 12:41:11 -0500
committerOz Linden <oz@lindenlab.com>2016-03-07 12:41:11 -0500
commit5822fb00b605d4f4ddd01e887b40d04b67e162a9 (patch)
tree0aa733a2357c99383f18ed34d2fb2ad4ad0caa24 /indra/newview/llvovolume.cpp
parentc7ebeb842010c4a814978f63c464e1546bd6a9be (diff)
parent346ee6595d395a92a1445441467971510e6f4b6d (diff)
merge DRTVWR-398 build cleanup fixes
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp31
1 files changed, 10 insertions, 21 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index b0eb60cc76..44daa939ad 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3355,6 +3355,13 @@ const LLMatrix4 LLVOVolume::getRenderMatrix() const
// children, and cost should only be increased for unique textures -Nyx
U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
{
+ /*****************************************************************
+ * This calculation should not be modified by third party viewers,
+ * since it is used to limit rendering and should be uniform for
+ * everyone. If you have suggested improvements, submit them to
+ * the official viewer for consideration.
+ *****************************************************************/
+
// Get access to params we'll need at various points.
// Skip if this is object doesn't have a volume (e.g. is an avatar).
BOOL has_volume = (getVolume() != NULL);
@@ -3428,7 +3435,7 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
{
// base cost is dependent on mesh complexity
// note that 3 is the highest LOD as of the time of this coding.
- S32 size = gMeshRepo.getMeshSize(volume_params.getSculptID(),3);
+ S32 size = gMeshRepo.getMeshSize(volume_params.getSculptID(), getLOD());
if ( size > 0)
{
if (gMeshRepo.getSkinInfo(volume_params.getSculptID(), this))
@@ -4720,10 +4727,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (pAvatarVO)
{
- pAvatarVO->mAttachmentGeometryBytes -= group->mGeometryBytes;
- pAvatarVO->mAttachmentGeometryBytes = llmax(pAvatarVO->mAttachmentGeometryBytes, 0);
- pAvatarVO->mAttachmentSurfaceArea -= group->mSurfaceArea;
- pAvatarVO->mAttachmentSurfaceArea = llmax(pAvatarVO->mAttachmentSurfaceArea, 0.f);
+ pAvatarVO->subtractAttachmentArea( group->mSurfaceArea );
}
group->mGeometryBytes = 0;
@@ -5277,24 +5281,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (pAvatarVO)
{
- if (pAvatarVO->mAttachmentGeometryBytes < 0)
- { // First time through value is -1
- pAvatarVO->mAttachmentGeometryBytes = group->mGeometryBytes;
- }
- else
- {
- pAvatarVO->mAttachmentGeometryBytes += group->mGeometryBytes;
- }
- if (pAvatarVO->mAttachmentSurfaceArea < 0.f)
- { // First time through value is -1
- pAvatarVO->mAttachmentSurfaceArea = group->mSurfaceArea;
- }
- else
- {
- pAvatarVO->mAttachmentSurfaceArea += group->mSurfaceArea;
+ pAvatarVO->addAttachmentArea( group->mSurfaceArea );
}
}
-}
static LLTrace::BlockTimerStatHandle FTM_REBUILD_MESH_FLUSH("Flush Mesh");