Преглед на файлове

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;
 
 		}