Explorar o código

WebGLState: Code clean up. See #6637.

Mr.doob %!s(int64=10) %!d(string=hai) anos
pai
achega
7954889f2f
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      src/renderers/webgl/WebGLState.js

+ 4 - 2
src/renderers/webgl/WebGLState.js

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