Baseline Widely available
Note: This feature is available in Web Workers.
The WebGLRenderingContext.bindRenderbuffer()
method of the WebGL API binds a given WebGLRenderbuffer
to a target, which must be gl.RENDERBUFFER
.
bindRenderbuffer(target, renderbuffer)
Parameters
target
A GLenum
specifying the binding point (target). Possible values:
gl.RENDERBUFFER
Buffer data storage for single images in a renderable internal format.
renderbuffer
A WebGLRenderbuffer
object to bind.
None (undefined
).
A gl.INVALID_ENUM
error is thrown if target
is not gl.RENDERBUFFER
.
const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
const renderbuffer = gl.createRenderbuffer();
gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);
Getting current bindings
To check the current renderbuffer binding, query the RENDERBUFFER_BINDING
constant.
gl.getParameter(gl.RENDERBUFFER_BINDING);
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4