WebGLRenderingContext.deleteRenderbuffer()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

WebGL APIWebGLRenderingContext.deleteRenderbuffer() 方法用来删除给定的 WebGLRenderbuffer 对象。如果渲染缓冲区已被删除,则此方法无效。

语法

void gl.deleteRenderbuffer(renderbuffer);

参数

renderbuffer

将要删除的{domxref("WebGLRenderbuffer")}} 对象。

返回值

None.

示例

删除一个渲染缓冲区

js
var canvas = document.getElementById("canvas");
var gl = canvas.getContext("webgl");
var renderbuffer = gl.createRenderbuffer();

// ...

gl.deleteRenderbuffer(renderbuffer);

规范

Specification
WebGL Specification
# 5.14.7

浏览器兼容性

BCD tables only load in the browser

参见