소스 검색

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 년 전
부모
커밋
08cc0db63a
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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;
 
 		}