Batch3D::point() check buffer overflow

This commit is contained in:
@clasher113 2024-09-10 14:35:47 +03:00
parent 897d22b50e
commit 3376ad6568

View File

@ -246,6 +246,9 @@ void Batch3D::blockCube(
}
void Batch3D::point(glm::vec3 coord, glm::vec2 uv, glm::vec4 tint) {
if (index + B3D_VERTEX_SIZE >= capacity) {
flush();
}
vertex(coord, uv, tint.r, tint.g, tint.b, tint.a);
}