소스 검색

WebGLState: Code clean up. See #6637.

Mr.doob 10 년 전
부모
커밋
7954889f2f
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  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;
 
 		}