MultisampleFramebuffer
Hierarchy
- Framebuffer
- MultisampleFramebuffer
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Parameters
options: MultisampleFramebufferOptions
Returns MultisampleFramebuffer
Properties
publicreadonlyinheritedbufferFormat
Format compatible with the canvas drawing buffer, needed for Framebuffer.blitToScreen
publicreadonlyinheritedfiltering
publicreadonlysamples
publicreadonlyinheritedtransparency
publicreadonlyinheritedwrapping
Accessors
publicglFramebuffer
The framebuffer to bind when drawing into this framebuffer.
On a MultisampleFramebuffer this is the multisampled renderbuffer framebuffer.
Returns WebGLFramebuffer
publicinheritedheight
Returns number
publicinheritedtexelSize
[1 / width, 1 / height], useful for passing to shaders that sample neighboring texels (blurs etc.)Returns [texelWidth: number, texelHeight: number]
publictexture
The color texture backing this framebuffer, for sampling as a source.
On a MultisampleFramebuffer reading this resolves the MSAA renderbuffer first.
Returns WebGLTexture
publicinheritedwidth
Returns number
Methods
publicblitToScreen
Blits the (resolved) contents 1:1 to the canvas drawing buffer
Returns void
publicinheritedclear
Clears the framebuffer to the provided color (transparent black by default)
Leaves this framebuffer bound
Parameters
optionalcolor: Color
Returns void
publicinheritedcopyToTexture
Copies the current (resolved) contents into the provided texture, which is reallocated at this framebuffer's dimensions
Parameters
texture: WebGLTexture
Returns void
publicdispose
Deletes the GL resources owned by this framebuffer, it cannot be used afterwards
Returns void
publicresize
Resize the framebuffer, contents are discarded
Parameters
width: number
height: number
Returns void
A Framebuffer backed by a multisampled renderbuffer.
Drawing goes into the MSAA renderbuffer (Framebuffer.glFramebuffer); reading Framebuffer.texture (or blitting/copying) resolves the samples into the backing color texture first, so consumers never need to sequence the resolve themselves.