From 28c453075a5319aab72e0c99f0e3215ee0a2e766 Mon Sep 17 00:00:00 2001 From: bjorn Date: Sun, 12 May 2019 14:04:45 -0700 Subject: [PATCH] Fix batching overflow; --- src/graphics/graphics.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/graphics/graphics.c b/src/graphics/graphics.c index 8b5403a4..0390350c 100644 --- a/src/graphics/graphics.c +++ b/src/graphics/graphics.c @@ -528,6 +528,10 @@ next: // Start a new batch if (!batch) { + if (state.batchCount >= MAX_BATCHES) { + lovrGraphicsFlush(); + } + float* transforms = lovrGraphicsMapBuffer(STREAM_TRANSFORM, MAX_DRAWS); Color* colors = lovrGraphicsMapBuffer(STREAM_COLOR, MAX_DRAWS);