summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-09-29 19:08:41 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-09-29 19:08:41 +0100
commit853924c7efd5c1d067c237d5a44c44db313745e9 (patch)
tree8ef0def6c5cd2640284b63be82a02315745d8398 /indra/newview/llvovolume.cpp
parent31f84c2a9a86a7f25eadcb1720a7a9292480be16 (diff)
SL-794 - use largest LOD for est tri count, instead of trusting that it's always the high LOD
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 121fb9c11e..efddc9235e 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3376,7 +3376,7 @@ bool LLVOVolume::canBeAnimatedObject() const
{
return false;
}
- F32 est_tris = recursiveGetEstTrianglesHigh();
+ F32 est_tris = recursiveGetEstTrianglesMax();
if (est_tris > getAnimatedObjectMaxTris())
{
LL_INFOS() << "est_tris " << est_tris << " exceeds limit " << getAnimatedObjectMaxTris() << LL_ENDL;
@@ -3388,12 +3388,15 @@ bool LLVOVolume::canBeAnimatedObject() const
bool LLVOVolume::isAnimatedObject() const
{
LLVOVolume *root_vol = (LLVOVolume*)getRootEdit();
- bool can_be_animated = canBeAnimatedObject();
- bool root_can_be_animated = root_vol->canBeAnimatedObject();
- bool root_is_animated = root_vol->getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG;
- if (can_be_animated && root_can_be_animated && root_is_animated)
+ bool root_is_animated_flag = root_vol->getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG;
+ if (root_is_animated_flag)
{
- return true;
+ bool root_can_be_animated = root_vol->canBeAnimatedObject();
+ bool this_can_be_animated = ((root_vol == this) && root_can_be_animated) || canBeAnimatedObject();
+ if (this_can_be_animated && root_can_be_animated)
+ {
+ return true;
+ }
}
return false;
}
@@ -3852,11 +3855,11 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
return (U32)shame;
}
-F32 LLVOVolume::getEstTrianglesHigh() const
+F32 LLVOVolume::getEstTrianglesMax() const
{
if (isMesh())
{
- return gMeshRepo.getEstTrianglesHigh(getVolume()->getParams().getSculptID());
+ return gMeshRepo.getEstTrianglesMax(getVolume()->getParams().getSculptID());
}
return 0.f;
}