Browse Source

Added GL call to disable attributes when reset is called. This fixes an issue where attribs are still enabled from previous frame but enabledAttributes structure has them marked as disabled. This lead to infamous 'attempt to access out of range vertices in attribute X' messages.

MiiBond 10 years ago
parent
commit
08cc0db63a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/renderers/webgl/WebGLState.js

+ 1 - 0
src/renderers/webgl/WebGLState.js

@@ -423,6 +423,7 @@ THREE.WebGLState = function ( gl, paramThreeToGL ) {
 
 		for ( var i = 0; i < enabledAttributes.length; i ++ ) {
 
+			gl.disableVertexAttribArray( i );
 			enabledAttributes[ i ] = 0;
 
 		}