WebGL2RenderingContext: renderbufferStorageMultisample() method

Note: This feature is available in Web Workers.

The WebGL2RenderingContext.renderbufferStorageMultisample() method of the WebGL 2 API returns creates and initializes a renderbuffer object's data store and allows specifying a number of samples to be used.

Syntax

js
renderbufferStorageMultisample(target, samples, internalFormat, width, height)

Parameters

target

A GLenum specifying the target renderbuffer object. Possible values:

gl.RENDERBUFFER

Buffer data storage for single images in a renderable internal format.

samples

A GLsizei specifying the number of samples to be used for the renderbuffer storage.

internalFormat

A GLenum specifying the internal format of the renderbuffer. Possible values (gl.DEPTH_STENCIL is not supported):

width

A GLsizei specifying the width of the renderbuffer in pixels.

height

A GLsizei specifying the height of the renderbuffer in pixels.

Return value

None (undefined).

Examples

js
gl.renderbufferStorageMultisample(gl.RENDERBUFFER, 4, gl.RGBA4, 256, 256);

Specifications

See also