glRenderbufferStorage Function
GL_APICALL void GL_APIENTRY glRenderbufferStorage(
GLenum target,
GLenum internalformat,
GLsizei width,
GLsizei height
);
| 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 |
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.
NN_GX_MEM_VRAMA: Allocate a region in VRAMA.NN_GX_MEM_VRAMB: Allocate a region in VRAMB.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_OES | A 32-bit format that uses 8 bits for each of the RGBA components. |
|---|---|
| GL_RGB565 | A 16-bit format that uses 5-bit red, 6-bit green, and 5-bit blue components. |
| GL_RGBA4 | A 16-bit format that uses 4 bits for each of the RGBA components. |
| GL_RGB5_A1 | A 16-bit format that uses 5 bits for each of the RGB components and 1 bit for the alpha component. |
| GL_GAS_DMP | A 32-bit format that uses 16 bits for each of the D1 and D2 density information components. |
| GL_DEPTH_COMPONENT16 | A 16-bit format for the depth component. |
| GL_DEPTH_COMPONENT24_OES | A 24-bit format for the depth component. |
| GL_DEPTH24_STENCIL8_EXT | A 32-bit format that uses a 24-bit depth component and an 8-bit stencil component. |
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_ENUM | The target or internalformat argument was set to an invalid value. |
|---|---|
| GL_INVALID_VALUE | The width or height argument is negative, or the maximum supported size was exceeded. |
| GL_INVALID_OPERATION | No render buffer is currently bound. |
| GL_OUT_OF_MEMORY | Failed to allocate the render buffer region. |
CONFIDENTIAL