mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Merge pull request #302 from clasher113/main
Batch3D::point() check buffer overflow
This commit is contained in:
commit
02677ac8be
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue