mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 05:21:49 +00:00
Removed batch2d empty draw calls
This commit is contained in:
parent
128dade587
commit
04f06a4717
1 changed files with 5 additions and 3 deletions
|
|
@ -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) {
|
void Batch2D::render(unsigned int gl_primitive) {
|
||||||
mesh->reload(buffer, index / B2D_VERTEX_SIZE);
|
if (index == 0)
|
||||||
mesh->draw(gl_primitive);
|
return;
|
||||||
index = 0;
|
mesh->reload(buffer, index / B2D_VERTEX_SIZE);
|
||||||
|
mesh->draw(gl_primitive);
|
||||||
|
index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch2D::render() {
|
void Batch2D::render() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue