提交 3442353b 编写于 作者: D dubejf

Unused reference to .buffer

`attribute.buffer` does seem to exist anymore. The only `.buffer`
property I could find was in `Audio`.

This seems to be a leftover from
4c7239eb, when `.buffer` was renamed
`.__webglBuffer`.

After stepping through with a debugger in `onGeometryDispose`, I
couldn't find any hidden state attached to the `BufferAttribute`.
`.__webglBuffer`  is attached to the `WebGLProperties`, not the
`BufferAttribute`.

With that, the last reference to `gl.deleteBuffer` is disappearing from
the library. Is that expected?
上级 48ca3777
......@@ -43,21 +43,6 @@ THREE.WebGLGeometries = function ( gl, info ) {
function onGeometryDispose( event ) {
var geometry = event.target;
var buffergeometry = geometries[ geometry.id ];
for ( var name in buffergeometry.attributes ) {
var attribute = buffergeometry.attributes[ name ];
if ( attribute.buffer !== undefined ) {
gl.deleteBuffer( attribute.buffer );
delete attribute.buffer;
}
}
geometry.removeEventListener( 'dispose', onGeometryDispose );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册