diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-05-15 17:24:24 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-05-15 17:24:24 +0300 |
commit | 7a18ee62eb4d6c6028d05f1da259fe8695f49a3f (patch) | |
tree | 57619c7cf450b518a6b75287a841a5c52bf8941c /intern/gawain | |
parent | c28a4eb8cb8c5abc3307c6a27b24ef274c72083c (diff) |
Gawain: Fix memory manager.
Diffstat (limited to 'intern/gawain')
-rw-r--r-- | intern/gawain/src/vertex_buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/gawain/src/vertex_buffer.c b/intern/gawain/src/vertex_buffer.c index e6514ccb3e6..0029e6d5fe9 100644 --- a/intern/gawain/src/vertex_buffer.c +++ b/intern/gawain/src/vertex_buffer.c @@ -55,8 +55,10 @@ void VertexBuffer_discard(VertexBuffer* verts) { if (verts->vbo_id) { int size; + glBindBuffer(GL_ARRAY_BUFFER, verts->vbo_id); glGetBufferParameteriv(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &size); vbo_memory_usage -= size; + glBindBuffer(GL_ARRAY_BUFFER, 0); buffer_id_free(verts->vbo_id); } |