Przeglądaj źródła

Added GL call to disable attributes when reset is called. This fixes an issue where attribs are still enabled from previous frame but enabledAttributes structure has them marked as disabled. This lead to infamous 'attempt to access out of range vertices in attribute X' messages.

MiiBond 10 lat temu
rodzic
commit
08cc0db63a
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      src/renderers/webgl/WebGLState.js

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

@@ -423,6 +423,7 @@ THREE.WebGLState = function ( gl, paramThreeToGL ) {
 
 		for ( var i = 0; i < enabledAttributes.length; i ++ ) {
 
+			gl.disableVertexAttribArray( i );
 			enabledAttributes[ i ] = 0;
 
 		}