--- title: WebGLRenderingContext.deleteRenderbuffer() slug: Web/API/WebGLRenderingContext/deleteRenderbuffer translation_of: Web/API/WebGLRenderingContext/deleteRenderbuffer ---
WebGL API 的 WebGLRenderingContext.deleteRenderbuffer()
方法用来删除给定的 {{domxref("WebGLRenderbuffer")}} 对象. 如果渲染缓冲区已被删除,则此方法无效.
void gl.deleteRenderbuffer(renderbuffer);
None.
var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var renderbuffer = gl.createRenderbuffer(); // ... gl.deleteRenderbuffer(renderbuffer);
Specification | Status | Comment |
---|---|---|
{{SpecName('WebGL', "#5.14.7", "deleteRenderbuffer")}} | {{Spec2('WebGL')}} | 初始定义. |
{{SpecName('OpenGL ES 2.0', "glDeleteRenderbuffers.xml", "glDeleteRenderbuffers")}} | {{Spec2('OpenGL ES 2.0')}} | OpenGL API手册(类似). |
{{Compat("api.WebGLRenderingContext.deleteRenderbuffer")}}