Explorar o código

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 %!s(int64=10) %!d(string=hai) anos
pai
achega
08cc0db63a
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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;
 
 		}