glGetRenderbufferParameteriv

Name

glGetRenderbufferParameteriv — return parameters of a renderbuffer object

C Specification

 void glGetRenderbufferParameteriv( GLenum target, GLenum pname, GLint * params);

Parameters

target

Specifies the target renderbuffer object. The symbolic constant must be GL_RENDERBUFFER.

pname

Specifies the symbolic name of a renderbuffer object parameter. Accepted values are GL_RENDERBUFFER_WIDTH, GL_RENDERBUFFER_HEIGHT, GL_RENDERBUFFER_INTERNAL_FORMAT, GL_RENDERBUFFER_RED_SIZE, GL_RENDERBUFFER_GREEN_SIZE, GL_RENDERBUFFER_BLUE_SIZE, GL_RENDERBUFFER_ALPHA_SIZE, GL_RENDERBUFFER_DEPTH_SIZE, or GL_RENDERBUFFER_STENCIL_SIZE.

params

Returns the requested parameter.

Description

glGetRenderbufferParameteriv returns in params a selected parameter of the currently bound renderbuffer object.

pname names a specific renderbuffer object parameter, as follows:

GL_RENDERBUFFER_WIDTH

params returns the width in pixels of the image of the currently bound renderbuffer. The initial value is 0.

GL_RENDERBUFFER_HEIGHT

params returns the height in pixels of the image of the currently bound renderbuffer. The initial value is 0.

GL_RENDERBUFFER_INTERNAL_FORMAT

params returns the internal format of the image of the currently bound renderbuffer. The initial value is GL_RGBA4.

GL_RENDERBUFFER_RED_SIZE

params returns the resolution in bits for the red component of the image of the currently bound renderbuffer. The initial value is 0.

GL_RENDERBUFFER_GREEN_SIZE

params returns the resolution in bits for the green component of the image of the currently bound renderbuffer. The initial value is 0.

GL_RENDERBUFFER_BLUE_SIZE

params returns the resolution in bits for the blue component of the image of the currently bound renderbuffer. The initial value is 0.

GL_RENDERBUFFER_ALPHA_SIZE

params returns the resolution in bits for the alpha component of the image of the currently bound renderbuffer. The initial value is 0.

GL_RENDERBUFFER_DEPTH_SIZE

params returns the resolution in bits for the depth component of the image of the currently bound renderbuffer. The initial value is 0.

GL_RENDERBUFFER_STENCIL_SIZE

params returns the resolution in bits for the stencil component of the image of the currently bound renderbuffer. The initial value is 0.

Notes

The resolution of components reported by glGetRenderbufferParameteriv are the actual resolutions at which the components are stored, which may be different than those requested by the internalformat parameter of glRenderbufferStorage.

If an error is generated, no change is made to the contents of params.

Errors

GL_INVALID_ENUM is generated if target is not GL_RENDERBUFFER.

GL_INVALID_ENUM is generated if pname is not GL_RENDERBUFFER_WIDTH, GL_RENDERBUFFER_HEIGHT, GL_RENDERBUFFER_INTERNAL_FORMAT, GL_RENDERBUFFER_RED_SIZE, GL_RENDERBUFFER_GREEN_SIZE, GL_RENDERBUFFER_BLUE_SIZE, GL_RENDERBUFFER_ALPHA_SIZE, GL_RENDERBUFFER_DEPTH_SIZE, or GL_RENDERBUFFER_STENCIL_SIZE.

GL_INVALID_OPERATION is generated if the reserved renderbuffer object name 0 is bound.