Creates a WebGLRenderBuffer.
OptionalsizeWhether GPU resources are currently allocated.
Bind the framebuffer, allocating or resizing as needed.
Clear currently bound framebuffer.
Destroy GPU resources and caches.
Wrapper texture for sampling the depth texture (if present).
Wrapper texture for sampling the first color target.
Whether this FBO has a depth texture attachment.
Read a single pixel from the given color attachment (default 0).
Read the entire color attachment into a typed array.
Returns a data URL (png/jpeg/bmp) of the current contents.
Returns an HTMLCanvasElement containing the current contents. Also updates an internal CPU-side ImageData cache for reuse.
Sets the desired size; actual allocation happens on next bind/touch.
Ensure GPU resources exist and match the desired size.
Unbind the framebuffer.
Re-associate with a restored WebGL2 context.
Represents a WebGL render buffer with optional depth texture and MRT support. Internally manages a framebuffer + one or more color textures and an optional depth attachment (either a texture or a renderbuffer).
Notes:
touch()when size or drawingBuffer changes.WebGLAbstractTexturefor sampling the color/depth textures.allocatedis derived from internal state (getter) instead of a manual flag.