diff --git a/src/graphics/Batch2D.cpp b/src/graphics/Batch2D.cpp index bd2e3b05..f0c6b5b3 100644 --- a/src/graphics/Batch2D.cpp +++ b/src/graphics/Batch2D.cpp @@ -304,9 +304,11 @@ void Batch2D::sprite(float x, float y, float w, float h, int atlasRes, int index } void Batch2D::render(unsigned int gl_primitive) { - mesh->reload(buffer, index / B2D_VERTEX_SIZE); - mesh->draw(gl_primitive); - index = 0; + if (index == 0) + return; + mesh->reload(buffer, index / B2D_VERTEX_SIZE); + mesh->draw(gl_primitive); + index = 0; } void Batch2D::render() {