浏览代码

Merge pull request #6637 from box/disableAttribFix

Added GL call to disable attributes when reset is called. This fixes …
Ricardo Cabello 10 年之前
父节点
当前提交
8e0e3ef83e
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/renderers/webgl/WebGLState.js

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

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