summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-05-24 15:04:49 -0500
committerDave Parks <davep@lindenlab.com>2010-05-24 15:04:49 -0500
commitcb487c002a45b1281f0cc028d6ffa74ae993330e (patch)
tree0c3b701d1b988c112de67160b1bd69d7a53fe5ad /indra/newview/llface.cpp
parent8c32e3bf29337e330a313d0e4865ebd03ad9ca50 (diff)
parent7eba473723a260a1025b5a865715573b2369298e (diff)
Merge
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 77e8a6fdf9..a65ee52fa1 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -368,10 +368,13 @@ void LLFace::setDrawable(LLDrawable *drawable)
void LLFace::setSize(const S32 num_vertices, const S32 num_indices)
{
- if (mGeomCount != num_vertices ||
+ //allocate vertices in blocks of 4 for alignment
+ S32 num_verts = (num_vertices + 0x3) & ~0x3;
+
+ if (mGeomCount != num_verts ||
mIndicesCount != num_indices)
{
- mGeomCount = num_vertices;
+ mGeomCount = num_verts;
mIndicesCount = num_indices;
mVertexBuffer = NULL;
mLastVertexBuffer = NULL;