aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVladimir Vukicevic <vladimirv@dugeo.com>2013-03-11 16:02:45 -0400
committerVladimir Vukicevic <vladimirv@dugeo.com>2013-03-11 16:02:45 -0400
commitcfa8aac0ac03d2fcd9ade9db347177b939e00bb7 (patch)
treed6e9add792fb667cbf0cf6257e730d18da8c9b79 /src
parent4b2e7f4c10ab3f39012e4f7789ced834b14fc697 (diff)
fix client side GL arrays in FULL_ES2
Diffstat (limited to 'src')
-rw-r--r--src/library_gl.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index b978e931..9e12e4ee 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -276,7 +276,7 @@ var LibraryGL = {
// TODO: initial pass to detect ranges we need to upload, might not need an upload per attrib
for (var i = 0; i < GL.maxVertexAttribs; ++i) {
var cb = GL.clientBuffers[i];
- if (!cb.enabled) continue;
+ if (!cb.clientside || !cb.enabled) continue;
GL.resetBufferBinding = true;
@@ -314,7 +314,7 @@ var LibraryGL = {
GL.maxVertexAttribs = Module.ctx.getParameter(Module.ctx.MAX_VERTEX_ATTRIBS);
#if FULL_ES2
for (var i = 0; i < GL.maxVertexAttribs; i++) {
- GL.clientBuffers[i] = { enabled: false, size: 0, type: 0, normalized: 0, stride: 0, ptr: 0 };
+ GL.clientBuffers[i] = { enabled: false, clientside: false, size: 0, type: 0, normalized: 0, stride: 0, ptr: 0 };
}
GL.generateTempBuffers();
@@ -2888,9 +2888,10 @@ var LibraryGL = {
cb.normalized = normalized;
cb.stride = stride;
cb.ptr = ptr;
+ cb.clientside = true;
return;
}
- cb.enabled = false;
+ cb.clientside = false;
#endif
Module.ctx.vertexAttribPointer(index, size, type, normalized, stride, ptr);
},