Fix batching overflow;

This commit is contained in:
bjorn 2019-05-12 14:04:45 -07:00
parent 511afef0c6
commit 28c453075a
1 changed files with 4 additions and 0 deletions

View File

@ -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);