aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library_gl.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index a994a665..5751dfe0 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -2546,6 +2546,7 @@ var LibraryGL = {
glBindVertexArray: function(vao) {
// undo vao-related things, wipe the slate clean, both for vao of 0 or an actual vao
GLEmulation.currentVao = null; // make sure the commands we run here are not recorded
+ if (GL.immediate.lastRenderer) GL.immediate.lastRenderer.cleanup();
_glBindBuffer(Module.ctx.ARRAY_BUFFER, 0); // XXX if one was there before we were bound?
_glBindBuffer(Module.ctx.ELEMENT_ARRAY_BUFFER, 0);
for (var vaa in GLEmulation.enabledVertexAttribArrays) {