diff options
| author | Matthew Breindel (Falcon) <falcon@lindenlab.com> | 2010-05-24 13:38:16 -0700 |
|---|---|---|
| committer | Matthew Breindel (Falcon) <falcon@lindenlab.com> | 2010-05-24 13:38:16 -0700 |
| commit | 52134bdc817ebfdea7733432e43e8e350944ab2e (patch) | |
| tree | 453d42133ec45dd1b8b29f3694e9bb0942c8c84c /indra/newview/llface.cpp | |
| parent | a2eb86b00927439afcf27219e38e58eba421294f (diff) | |
| parent | cb487c002a45b1281f0cc028d6ffa74ae993330e (diff) | |
Merge
Diffstat (limited to 'indra/newview/llface.cpp')
| -rw-r--r-- | indra/newview/llface.cpp | 7 |
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; |
