diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index 003efc1..67973f5 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -230,10 +230,20 @@ */ WebGLState.prototype.resetAttributes = function() { + var i; + + for ( i = 0; i < this.attribState.tempAttribState.length; i++) { + this.attribState.tempAttribState[i] = 0; + } + + for ( i = 0; i < this.attribState.attribState.length; i++) { + this.attribState.attribState[i] = 0; + } + var gl = this.gl; // im going to assume one is always active for performance reasons. - for (var i = 1; i < this.maxAttribs; i++) + for (i = 1; i < this.maxAttribs; i++) { gl.disableVertexAttribArray(i); } @@ -245,6 +255,7 @@ */ WebGLState.prototype.resetToDefault = function() { + // unbind any VAO if they exist.. if(this.nativeVaoExtension) {