aboutsummaryrefslogtreecommitdiff
path: root/src/library_gl.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-02-08 12:11:13 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-02-08 12:11:13 -0800
commitf1c434e1983f29c35433993e6cecfdc178365ace (patch)
tree3745f3f6535818d56d6bfdc34bf8b4be50b135de /src/library_gl.js
parent9beec600be686bb78f4c8cd65f2e80504deae625 (diff)
check for restriding exceeding the temp buffer size
Diffstat (limited to 'src/library_gl.js')
-rw-r--r--src/library_gl.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index f37fde78..5e8f4c84 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -2020,6 +2020,9 @@ var LibraryGL = {
attribute.offset = bytes;
bytes += size;
}
+#if ASSERTIONS
+ assert(count*bytes < GL.immediate.MAX_TEMP_BUFFER_SIZE);
+#endif
// copy out the data (we need to know the stride for that, and define attribute.pointer
for (var i = 0; i < attributes.length; i++) {
var attribute = attributes[i];