Fix a bug in previous commit.

This commit is contained in:
SmileTheory 2014-10-15 20:28:26 -07:00
parent e34972b110
commit 03ac9649ea

View file

@ -429,14 +429,13 @@ static qboolean RB_SurfaceVao(vao_t *vao, int numVerts, int numIndexes, int firs
firstIndexOffset = BUFFER_OFFSET(firstIndex * sizeof(glIndex_t)); firstIndexOffset = BUFFER_OFFSET(firstIndex * sizeof(glIndex_t));
lastIndexOffset = BUFFER_OFFSET((firstIndex + numIndexes) * sizeof(glIndex_t)); lastIndexOffset = BUFFER_OFFSET((firstIndex + numIndexes) * sizeof(glIndex_t));
if (r_mergeMultidraws->integer) if (tess.multiDrawPrimitives && r_mergeMultidraws->integer)
{ {
i = 0; i = 0;
if (r_mergeMultidraws->integer == 1) if (r_mergeMultidraws->integer == 1)
{ {
// lazy merge, only check the last primitive // lazy merge, only check the last primitive
// harmless if no multidraw primitives (i = -1 < 0)
i = tess.multiDrawPrimitives - 1; i = tess.multiDrawPrimitives - 1;
} }