fix mixing up of SDL and libc allocators, proper flushing of quad build buffers

This commit is contained in:
veclavtalica
2025-01-30 21:57:20 +03:00
parent 7074e7499a
commit bd89c4b938
16 changed files with 33 additions and 26 deletions

View File

@ -229,7 +229,8 @@ VertexBufferBuilder build_vertex_buffer(VertexBuffer buffer, size_t bytes) {
void finish_vertex_builder(VertexBufferBuilder *builder) {
glUnmapBuffer(GL_ARRAY_BUFFER);
if (!glUnmapBuffer(GL_ARRAY_BUFFER))
CRY("finish_vertex_builder", "Error unmapping a vertex array buffer");
glBindBuffer(GL_ARRAY_BUFFER, 0);
builder->base = 0;