From f2f0e850f1920d33f20dda3e6e9fe93a0315f3f5 Mon Sep 17 00:00:00 2001 From: SmileTheory Date: Wed, 15 Oct 2014 20:28:26 -0700 Subject: Fix a bug in previous commit. --- src/renderergl2/tr_surface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/renderergl2/tr_surface.c b/src/renderergl2/tr_surface.c index f4451eb8..b74ba369 100644 --- a/src/renderergl2/tr_surface.c +++ b/src/renderergl2/tr_surface.c @@ -430,14 +430,13 @@ static qboolean RB_SurfaceVao(vao_t *vao, int numVerts, int numIndexes, int firs firstIndexOffset = BUFFER_OFFSET(firstIndex * sizeof(glIndex_t)); lastIndexOffset = BUFFER_OFFSET((firstIndex + numIndexes) * sizeof(glIndex_t)); - if (r_mergeMultidraws->integer) + if (tess.multiDrawPrimitives && r_mergeMultidraws->integer) { i = 0; if (r_mergeMultidraws->integer == 1) { // lazy merge, only check the last primitive - // harmless if no multidraw primitives (i = -1 < 0) i = tess.multiDrawPrimitives - 1; } -- cgit