--- title: WebGLRenderingContext.deleteBuffer() slug: Web/API/WebGLRenderingContext/deleteBuffer translation_of: Web/API/WebGLRenderingContext/deleteBuffer ---
WebGLRenderingContext.deleteBuffer()
用于删除给定的{{domxref("WebGLBuffer")}}对象;若给定的{{domxref("WebGLBuffer")}}对象已经被删除了,调用该方法将不会产生任何效果。
void gl.deleteBuffer(buffer);
None.
var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var buffer = gl.createBuffer(); // ... gl.deleteBuffer(buffer);
Specification | Status | Comment |
---|---|---|
{{SpecName('WebGL', "#5.14.5", "deleteBuffer")}} | {{Spec2('WebGL')}} | Initial definition. |
{{SpecName('OpenGL ES 2.0', "glDeleteBuffers.xml", "glDeleteBuffers")}} | {{Spec2('OpenGL ES 2.0')}} | Man page of the (similar) OpenGL API. |
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
{{Compat("api.WebGLRenderingContext.deleteBuffer")}}