diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-20 14:03:31 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-20 14:03:31 -0800 |
commit | 7993ab4d6b5ef1eafcc913c2ae1ba4b0d641d1f9 (patch) | |
tree | 4d64476fe8b57556647e6b60a69a2e4455010ae5 /src | |
parent | 36c82414cb8149e4e0cb7c8bcedfe0204e8d6d90 (diff) |
TODO: multiple array buffers in vao (for each vertex attrib pointer separately)
Diffstat (limited to 'src')
-rw-r--r-- | src/library_gl.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index 8cebfc89..ae93104a 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -1289,7 +1289,10 @@ var LibraryGL = { glBindBuffer(target, buffer); if (target == Module.ctx.ARRAY_BUFFER) { GL.currArrayBuffer = buffer; - if (GLEmulation.currentVao) GLEmulation.currentVao.arrayBuffer = buffer; + if (GLEmulation.currentVao) { + assert(GLEmulation.currentVao.arrayBuffer == buffer || GLEmulation.currentVao.arrayBuffer == 0 || buffer == 0, 'TODO: support for multiple array buffers in vao'); + GLEmulation.currentVao.arrayBuffer = buffer; + } } else if (target == Module.ctx.ELEMENT_ARRAY_BUFFER) { GL.currElementArrayBuffer = buffer; if (GLEmulation.currentVao) GLEmulation.currentVao.elementArrayBuffer = buffer; |