files/en-us/web/api/webgl2renderingcontext/drawbuffers/index.md
{{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.
drawBuffers(buffers)
buffers
gl.NONE
gl.BACK
gl.COLOR_ATTACHMENT{0-15}
None ({{jsxref("undefined")}}).
buffers contains not one of the accepted values, a
gl.INVALID_ENUM error is thrown.gl.drawBuffers([gl.NONE, gl.COLOR_ATTACHMENT1]);
{{Specifications}}
{{Compat}}