summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llvolume.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index e7a0bc7df7..7f221fd686 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -4729,13 +4729,13 @@ void LLVolumeFace::optimize(F32 angle_cutoff)
}
}
- // Only swap data if we've actually optimized the mesh
+ // disallow data amplification
//
- if (new_face.mNumVertices < mNumVertices)
+ if (new_face.mNumVertices <= mNumVertices)
{
llassert(new_face.mNumIndices == mNumIndices);
- swapData(new_face);
- }
+ swapData(new_face);
+ }
}
class LLVCacheTriangleData;
@@ -5316,12 +5316,7 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
S32 max_t = volume->getPath().mPath.size();
// S32 i;
- S32 num_vertices = 0, num_indices = 0;
S32 grid_size = (profile.size()-1)/4;
- S32 quad_count = (grid_size * grid_size);
-
- num_vertices = (grid_size+1)*(grid_size+1);
- num_indices = quad_count * 4;
LLVector4a& min = mExtents[0];
LLVector4a& max = mExtents[1];
@@ -6738,3 +6733,4 @@ void calc_binormal_from_triangle(LLVector4a& binormal,
binormal.set( 0, 1 , 0 );
}
}
+