Browse Source

Clean up enableAttribute of WebGLState

Takahiro 7 years ago
parent
commit
dfb93f6409
1 changed files with 1 additions and 17 deletions
  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 ) {
 	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 );
 
 
 	}
 	}