Removed batch2d empty draw calls
This commit is contained in:
@@ -304,6 +304,8 @@ void Batch2D::sprite(float x, float y, float w, float h, int atlasRes, int index
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Batch2D::render(unsigned int gl_primitive) {
|
void Batch2D::render(unsigned int gl_primitive) {
|
||||||
|
if (index == 0)
|
||||||
|
return;
|
||||||
mesh->reload(buffer, index / B2D_VERTEX_SIZE);
|
mesh->reload(buffer, index / B2D_VERTEX_SIZE);
|
||||||
mesh->draw(gl_primitive);
|
mesh->draw(gl_primitive);
|
||||||
index = 0;
|
index = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user