--- title: WebGLRenderingContext.deleteFramebuffer() slug: Web/API/WebGLRenderingContext/deleteFramebuffer translation_of: Web/API/WebGLRenderingContext/deleteFramebuffer ---
WebGL API 的 WebGLRenderingContext.deleteFramebuffer()
方法用来删除给定的{{domxref("WebGLFramebuffer")}} 对象. 如果帧缓冲区已被删除,则此方法无效。.
void gl.deleteFramebuffer(framebuffer);
None.
var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var framebuffer = gl.createFramebuffer(); // ... gl.deleteFramebuffer(framebuffer);
Specification | Status | Comment |
---|---|---|
{{SpecName('WebGL', "#5.14.6", "deleteFramebuffer")}} | {{Spec2('WebGL')}} | 初始定义. |
{{SpecName('OpenGL ES 2.0', "glDeleteFramebuffers.xml", "glDeleteFramebuffers")}} | {{Spec2('OpenGL ES 2.0')}} | 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.deleteFramebuffer")}}