Expand Minimize

getRenderbufferParameter method

Returns a renderbuffer parameter from the currently bound WebGLRenderbuffer object.

IE11

Syntax

var type = WebGLRenderingContext.getRenderbufferParameter(target, pname);

Parameters

target [in]

Type: Number

Constant, must be gl.RENDERBUFFER.

pname [in]

Type: Number

Values for the image in the currently bound WebGLRenderbuffer object. See remarks for list.

Return value

Type: Number

Returns the value of the parameter specified by pname, or null if an error. See remarks for list.

Remarks

Return numeric values for pname:

PnameDescriptionDefault
gl.RENDERBUFFER_WIDTHThe width (in pixels). 0
gl.RENDERBUFFER_HEIGHTThe height (in pixels).0
gl.RENDERBUFFER_INTERNAL_FORMATThe internal format for the image. RGBA4
gl.RENDERBUFFER_GREEN_SIZEThe resolution size (in bits) for the green component.0
gl.RENDERBUFFER_BLUE_SIZEThe resolution size (in bits) for the blue component.0
gl.RENDERBUFFER_RED_SIZEThe resolution size (in bits) for the red component.0
gl.RENDERBUFFER_ALPHA_SIZEThe resolution size (in bits) for the alpha component.0
gl.RENDERBUFFER_DEPTH_SIZEThe resolution size (in bits) for the depth component.0
gl.RENDERBUFFER_STENCIL_SIZEThe resolution size (in bits) for the stencil component.0

 

WebGL errorDescription
gl.INVALID_ENUM
  • If target isn't gl.RENDERBUFFER.
  • If pname isn't one of the listed constants.
gl.INVALID_OPERATIONIf no renderbuffer is bound.

 

See also

WebGLRenderingContext

 

 

Show:
© 2014 Microsoft. All rights reserved.