WebGLRenderingContext.deleteBuffer()

您正在阅读此内容的英文版本,因为该语系尚未翻译。 帮助我们翻译此文章吧!

WebGL APIWebGLRenderingContext.deleteBuffer()用于删除给定的WebGLBuffer对象;若给定的WebGLBuffer对象已经被删除了,调用该方法将不会产生任何效果。

 

语法

void gl.deleteBuffer(buffer);

参数

buffer
要删除的WebGLBuffer 对象.

返回值

None.

例子

删除一个buffer

var canvas = document.getElementById('canvas');
var gl = canvas.getContext('webgl');
var buffer = gl.createBuffer();

// ...

gl.deleteBuffer(buffer);

规范

Specification Status Comment
WebGL 1.0
deleteBuffer
Recommendation Initial definition.
OpenGL ES 2.0
glDeleteBuffers
Standard Man page of the (similar) OpenGL API.

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
deleteBufferChrome Full support 9Edge Full support 12Firefox Full support 4IE Full support 11Opera Full support 12Safari Full support 5.1WebView Android Full support YesChrome Android Full support 25Firefox Android Full support YesOpera Android Full support 12Safari iOS Full support 8Samsung Internet Android Full support Yes

Legend

Full support  
Full support

相关链接