docs.rodeo

MDN Web Docs mirror

WebGL2RenderingContext: drawBuffers() method

{{APIRef("WebGL")}} {{AvailableInWorkers}} 

The WebGL2RenderingContext.drawBuffers() method of the WebGL 2 API defines draw buffers to which fragment colors are written into. The draw buffer settings are part of the state of the currently bound framebuffer or the drawing buffer if no framebuffer is bound.

Syntax

drawBuffers(buffers)

Parameters

Return value

None ({{jsxref("undefined")}} ).

Exceptions

Examples

gl.drawBuffers([gl.NONE, gl.COLOR_ATTACHMENT1]);

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN