glRenderbufferStorage Function

Syntax

GL_APICALL void GL_APIENTRY glRenderbufferStorage(
     GLenum target,
     GLenum internalformat,
     GLsizei width,
     GLsizei height
);

Arguments

Name Description
in target Target render buffer object
in internalformat Format of the region to allocate
in width Width of the region to allocate
in height Height of the region to allocate

Return Values

No values are returned.

Description

Allocates the data region for the current render buffer object.

Set target to GL_RENDERBUFFER. To also specify the data region, set target to a bitwise OR that includes the following values.

If you do not specify the above values, NN_GX_MEM_VRAMA is applied. You cannot specify the data region with POD.

Set internalformat to the internal format. You can set internalformat to the following values.

GL_RGBA8_OESA 32-bit format that uses 8 bits for each of the RGBA components.
GL_RGB565A 16-bit format that uses 5-bit red, 6-bit green, and 5-bit blue components.
GL_RGBA4A 16-bit format that uses 4 bits for each of the RGBA components.
GL_RGB5_A1A 16-bit format that uses 5 bits for each of the RGB components and 1 bit for the alpha component.
GL_GAS_DMPA 32-bit format that uses 16 bits for each of the D1 and D2 density information components.
GL_DEPTH_COMPONENT16A 16-bit format for the depth component.
GL_DEPTH_COMPONENT24_OESA 24-bit format for the depth component.
GL_DEPTH24_STENCIL8_EXTA 32-bit format that uses a 24-bit depth component and an 8-bit stencil component.
You cannot specify GL_STENCIL_INDEX8 from the OpenGL ES 2.0 standard.

Set width and height to the width and height of the render buffer.

This function generates the following errors.

GL_INVALID_ENUMThe target or internalformat argument was set to an invalid value.
GL_INVALID_VALUEThe width or height argument is negative, or the maximum supported size was exceeded.
GL_INVALID_OPERATIONNo render buffer is currently bound.
GL_OUT_OF_MEMORYFailed to allocate the render buffer region.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL