瀏覽代碼

Merge pull request #14037 from takahirox/WebGLStateCleanup

Clean up enableAttribute of WebGLState
Mr.doob 7 年之前
父節點
當前提交
6351792125
共有 1 個文件被更改,包括 1 次插入17 次删除
  1. 1 17
      src/renderers/webgl/WebGLState.js

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

@@ -417,23 +417,7 @@ function WebGLState( gl, extensions, utils ) {
 
 	function enableAttribute( attribute ) {
 
-		newAttributes[ attribute ] = 1;
-
-		if ( enabledAttributes[ attribute ] === 0 ) {
-
-			gl.enableVertexAttribArray( attribute );
-			enabledAttributes[ attribute ] = 1;
-
-		}
-
-		if ( attributeDivisors[ attribute ] !== 0 ) {
-
-			var extension = extensions.get( 'ANGLE_instanced_arrays' );
-
-			extension.vertexAttribDivisorANGLE( attribute, 0 );
-			attributeDivisors[ attribute ] = 0;
-
-		}
+		enableAttributeAndDivisor( attribute, 0 );
 
 	}
 

粤ICP备19079148号