Expand Minimize

getFramebufferAttachmentParameter method

Gets a parameter value for a given target and attachment.

IE11

 

Syntax

var retVal = WebGLRenderingContext.getFramebufferAttachmentParameter(target, attachment, pname);

Parameters

target [in]

Type: Number

Defines what the target is. Must be the constant gl.FRAMEBUFFER.

attachment [in]

Type: Number

One of the following:

gl.COLOR_ATTACHMENT0
gl.DEPTH_ATTACHMENT
gl.STENCIL_ATTACHMENT
gl.DEPTH_STENCIL_ATTACHMENT
pname [in]

Type: Number

The name of the attachment parameter to get.

gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE

Remarks

WebGL errorDescription
gl.INVALID_ENUM
  • target isn't set to gl.FRAMEBUFFER.
  • attachment isn't set to gl.COLOR_ATTACHMENT0, gl.DEPTH_ATTACHMENT, or gl.STENCIL_ATTACHMENT.
  • The object at the attachment point is gl.TEXTURE, and pname isn't set to gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, or gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE.
  • There is no attached object at the named attachment point and pname is not gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE.
gl.INVALID_OPERATIONThe default WebGLFramebuffer object name 0 is already bound.

 

See also

WebGLRenderingContext

 

 

Show:
© 2014 Microsoft