Browse Source

Merge pull request #6637 from box/disableAttribFix

Added GL call to disable attributes when reset is called. This fixes …
Ricardo Cabello 10 years ago
parent
commit
8e0e3ef83e
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/renderers/webgl/WebGLState.js

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

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