소스 검색

Only disable attributes that were previously enabled

MiiBond 10 년 전
부모
커밋
8522e52fdb
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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;
 
 		}