summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSmileTheory <SmileTheory@gmail.com>2014-10-15 20:28:26 -0700
committerTim Angus <tim@ngus.net>2015-03-17 11:38:54 +0000
commitf2f0e850f1920d33f20dda3e6e9fe93a0315f3f5 (patch)
tree84076b49f4a8f051138a7d887d8355cde44ead24
parent4b2503c850ecc09c01569abed2f910ab4c08ea04 (diff)
Fix a bug in previous commit.
-rw-r--r--src/renderergl2/tr_surface.c3
1 files changed, 1 insertions, 2 deletions
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;
}