Przeglądaj źródła

WebGLGeoemtries: Ensure obsolete wireframe buffers are deleted.

Mugen87 6 lat temu
rodzic
commit
314fb875e4
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      src/renderers/webgl/WebGLGeometries.js

+ 2 - 0
src/renderers/webgl/WebGLGeometries.js

@@ -159,6 +159,8 @@ function WebGLGeometries( gl, attributes, info ) {
 
 		attributes.update( attribute, gl.ELEMENT_ARRAY_BUFFER );
 
+		if ( wireframeAttributes[ geometry.id ] ) attributes.remove( wireframeAttributes[ geometry.id ] );
+
 		wireframeAttributes[ geometry.id ] = attribute;
 
 	}