Browse Source

WebGLGeoemtries: Ensure obsolete wireframe buffers are deleted.

Mugen87 6 years ago
parent
commit
314fb875e4
1 changed files with 2 additions and 0 deletions
  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 );
 		attributes.update( attribute, gl.ELEMENT_ARRAY_BUFFER );
 
 
+		if ( wireframeAttributes[ geometry.id ] ) attributes.remove( wireframeAttributes[ geometry.id ] );
+
 		wireframeAttributes[ geometry.id ] = attribute;
 		wireframeAttributes[ geometry.id ] = attribute;
 
 
 	}
 	}