summaryrefslogtreecommitdiff
path: root/indra/newview/llspatialpartition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rw-r--r--indra/newview/llspatialpartition.cpp32
1 files changed, 10 insertions, 22 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index e69fe9f99e..bd6be14341 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -236,7 +236,7 @@ void LLSpatialGroup::buildOcclusion()
{
if (!mOcclusionVerts)
{
- mOcclusionVerts = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*8);
+ mOcclusionVerts = new LLVector4a[8];
}
LLVector4a fudge;
@@ -339,14 +339,12 @@ LLSpatialGroup::~LLSpatialGroup()
sQueryPool.release(mOcclusionQuery[LLViewerCamera::sCurCameraID]);
}
- ll_aligned_free_16(mOcclusionVerts);
+ delete [] mOcclusionVerts;
mOcclusionVerts = NULL;
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
clearDrawMap();
clearAtlasList() ;
-
- ll_aligned_free_16(mBounds);
}
BOOL LLSpatialGroup::hasAtlas(LLTextureAtlas* atlasp)
@@ -1161,17 +1159,10 @@ LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) :
sNodeCount++;
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
- mBounds = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a) * V4_COUNT);
- mExtents = mBounds + EXTENTS;
- mObjectBounds = mBounds + OBJECT_BOUNDS;
- mObjectExtents = mBounds + OBJECT_EXTENTS;
- mViewAngle = mBounds+VIEW_ANGLE;
- mLastUpdateViewAngle = mBounds+LAST_VIEW_ANGLE;
-
- mViewAngle->splat(0.f);
- mLastUpdateViewAngle->splat(-1.f);
+ mViewAngle.splat(0.f);
+ mLastUpdateViewAngle.splat(-1.f);
mExtents[0] = mExtents[1] = mObjectBounds[0] = mObjectBounds[0] = mObjectBounds[1] =
- mObjectExtents[0] = mObjectExtents[1] = *mViewAngle;
+ mObjectExtents[0] = mObjectExtents[1] = mViewAngle;
sg_assert(mOctreeNode->getListenerCount() == 0);
mOctreeNode->addListener(this);
@@ -1247,12 +1238,12 @@ F32 LLSpatialPartition::calcDistance(LLSpatialGroup* group, LLCamera& camera)
LLVector4a view_angle = eye;
LLVector4a diff;
- diff.setSub(view_angle, *group->mLastUpdateViewAngle);
+ diff.setSub(view_angle, group->mLastUpdateViewAngle);
if (diff.getLength3().getF32() > 0.64f)
{
- *group->mViewAngle = view_angle;
- *group->mLastUpdateViewAngle = view_angle;
+ group->mViewAngle = view_angle;
+ group->mLastUpdateViewAngle = view_angle;
//for occasional alpha sorting within the group
//NOTE: If there is a trivial way to detect that alpha sorting here would not change the render order,
//not setting this node to dirty would be a very good thing
@@ -1432,7 +1423,7 @@ void LLSpatialGroup::destroyGL()
}
}
- ll_aligned_free_16(mOcclusionVerts);
+ delete [] mOcclusionVerts;
mOcclusionVerts = NULL;
for (LLSpatialGroup::element_iter i = getData().begin(); i != getData().end(); ++i)
@@ -4187,8 +4178,7 @@ LLDrawInfo::LLDrawInfo(U16 start, U16 end, U32 count, U32 offset,
mDrawMode(LLRender::TRIANGLES)
{
mVertexBuffer->validateRange(mStart, mEnd, mCount, mOffset);
- mExtents = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*2);
-
+
mDebugColor = (rand() << 16) + rand();
}
@@ -4208,8 +4198,6 @@ LLDrawInfo::~LLDrawInfo()
{
gPipeline.checkReferences(this);
}
-
- ll_aligned_free_16(mExtents);
}
void LLDrawInfo::validate()