Skip to content

Commit 6351792

Browse files
authored
Merge pull request #14037 from takahirox/WebGLStateCleanup
Clean up enableAttribute of WebGLState
2 parents 1645dbf + dfb93f6 commit 6351792

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/renderers/webgl/WebGLState.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -417,23 +417,7 @@ function WebGLState( gl, extensions, utils ) {
417417

418418
function enableAttribute( attribute ) {
419419

420-
newAttributes[ attribute ] = 1;
421-
422-
if ( enabledAttributes[ attribute ] === 0 ) {
423-
424-
gl.enableVertexAttribArray( attribute );
425-
enabledAttributes[ attribute ] = 1;
426-
427-
}
428-
429-
if ( attributeDivisors[ attribute ] !== 0 ) {
430-
431-
var extension = extensions.get( 'ANGLE_instanced_arrays' );
432-
433-
extension.vertexAttribDivisorANGLE( attribute, 0 );
434-
attributeDivisors[ attribute ] = 0;
435-
436-
}
420+
enableAttributeAndDivisor( attribute, 0 );
437421

438422
}
439423

0 commit comments

Comments
 (0)