summaryrefslogtreecommitdiff
path: root/indra/newview/llpolymesh.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-12-21 17:02:47 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-12-21 17:02:47 -0500
commitc8682722ad6b889b13ce288c417cb6b82ed273ac (patch)
tree234f76107be807c1bd36d8c1664364ee17421507 /indra/newview/llpolymesh.cpp
parent461241a6300dcf29b06b2403c824fefd1d91a8fd (diff)
SH-2789 WIP - aligned alloc and realloc
Diffstat (limited to 'indra/newview/llpolymesh.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llpolymesh.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp
index 450f9b2be7..0860506086 100644..100755
--- a/indra/newview/llpolymesh.cpp
+++ b/indra/newview/llpolymesh.cpp
@@ -129,22 +129,22 @@ void LLPolyMeshSharedData::freeMeshData()
{
mNumVertices = 0;
- delete [] mBaseCoords;
+ ll_aligned_free_16(mBaseCoords);
mBaseCoords = NULL;
- delete [] mBaseNormals;
+ ll_aligned_free_16(mBaseNormals);
mBaseNormals = NULL;
- delete [] mBaseBinormals;
+ ll_aligned_free_16(mBaseBinormals);
mBaseBinormals = NULL;
- delete [] mTexCoords;
+ ll_aligned_free_16(mTexCoords);
mTexCoords = NULL;
- delete [] mDetailTexCoords;
+ ll_aligned_free_16(mDetailTexCoords);
mDetailTexCoords = NULL;
- delete [] mWeights;
+ ll_aligned_free_16(mWeights);
mWeights = NULL;
}
@@ -229,12 +229,12 @@ U32 LLPolyMeshSharedData::getNumKB()
BOOL LLPolyMeshSharedData::allocateVertexData( U32 numVertices )
{
U32 i;
- mBaseCoords = new LLVector3[ numVertices ];
- mBaseNormals = new LLVector3[ numVertices ];
- mBaseBinormals = new LLVector3[ numVertices ];
- mTexCoords = new LLVector2[ numVertices ];
- mDetailTexCoords = new LLVector2[ numVertices ];
- mWeights = new F32[ numVertices ];
+ mBaseCoords = (LLVector3*) ll_aligned_malloc_16(numVertices*sizeof(LLVector3));
+ mBaseNormals = (LLVector3*) ll_aligned_malloc_16(numVertices*sizeof(LLVector3));
+ mBaseBinormals = (LLVector3*) ll_aligned_malloc_16(numVertices*sizeof(LLVector3));
+ mTexCoords = (LLVector2*) ll_aligned_malloc_16(numVertices*sizeof(LLVector2));
+ mDetailTexCoords = (LLVector2*) ll_aligned_malloc_16(numVertices*sizeof(LLVector2));
+ mWeights = (F32*) ll_aligned_malloc_16(numVertices*sizeof(F32));
for (i = 0; i < numVertices; i++)
{
mWeights[i] = 0.f;