diff options
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 31 |
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"); |