Răsfoiți Sursa

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 ani în urmă
părinte
comite
08cc0db63a
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  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;
 
 		}