Explorar o código

Only disable attributes that were previously enabled

MiiBond %!s(int64=10) %!d(string=hai) anos
pai
achega
8522e52fdb
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/renderers/webgl/WebGLState.js

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

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