framebufferRenderbuffer
TOC
Collapse the table of content
Expand the table of content

framebufferRenderbuffer method

Attaches a WebGLRenderbuffer object as a logical buffer to the currently bound WebGLFramebuffer object.

IE11

 

Syntax

WebGLRenderingContext.framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);

Parameters

target [in]

Type: Number

Always use gl.FRAMEBUFFER.

attachment [in]

Type: Number

Specifies the attachment point. One of the following:

gl.COLOR_ATTACHMENT0
gl.DEPTH_ATTACHMENT
gl.STENCIL_ATTACHEMENT
gl.DEPTH_STENCIL_ATTACHEMENT
renderbuffertarget [in]

Type: Number

Always use gl.RENDERBUFFER.

renderbuffer [in]

Type: WebGLRenderbuffer

The WebGLRenderbuffer object to attach.

Return value

This method does not return a value.

Remarks

WebGL errorDescription
gl.INVALID_ENUM
  • If target isn't gl.FRAMEBUFFER
  • If renderbuffertarget isn't gl.RENDERBUFFER and renderbuffer isn't 0.
  • If attachment isn't a valid attachment point.
  • If renderbuffer isn't an existing WebGLRenderbuffer.
gl.INVALID_OPERATIONIf renderbuffer isn't an existing WebGLRenderbuffer.

 

This can be set, but any STENCIL portions of attachments will be ignored.

See also

WebGLRenderingContext

 

 

Show:
© 2016 Microsoft