web api instance method
WebGLRenderingContext: createFramebuffer() method
Available in workers
The WebGLRenderingContext.createFramebuffer() method of
the WebGL API creates and initializes a
WebGLFramebuffer object.
Syntax
createFramebuffer()
Parameters
None.
Return value
A WebGLFramebuffer object.
Examples
Creating a frame buffer
const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
const framebuffer = gl.createFramebuffer();
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
bindFramebuffer()deleteFramebuffer()isFramebuffer()- Other buffers:
WebGLBuffer,WebGLRenderbuffer