nngxDisplaybufferStorage Function

Syntax

NNGX_APICALL void NNGX_APIENTRY nngxDisplaybufferStorage(
     GLenum format,
     GLsizei width,
     GLsizei height,
     GLenum area
);

Arguments

Name Description
in format Display buffer format.
in width Display buffer width (in the direction of scan lines).
in height Display buffer height (in the vertical direction relative to scan lines).
in area Display buffer region.

Return Values

No values are returned.

Description

Allocates a region for the display buffer bound to the active display target.

The allocated region stores image data to display.

Set format to the following values for the display buffer format.

GL_RGBA8_OESRGBA8 (32-bit)
GL_RGB8_OESRGB8 (24-bit)
GL_RGBA4RGBA4 (16-bit)
GL_RGB5_A1RGBA5551 (16-bit)
GL_RGB565RGB565 (16-bit)

Set width and height to the width and height of the display buffer. Both width and height must be greater than 0. You must also set width and height to a multiple of the block size for the color buffer to transfer to the display buffer. This must be a multiple of 8 in 8-block mode and a multiple of 32 in 32-block mode.

Set area to the following values to configure where the region is placed.

NN_GX_MEM_FCRAMAllocates the region in main memory.
NN_GX_MEM_VRAMAAllocates the region in the A channel in VRAM.
NN_GX_MEM_VRAMBAllocates the region in the B channel in VRAM.

Note: If you allocate the display buffer in VRAM, you cannot place the buffer within the last 1.5 MB of either the A-channel or B-channel region.

The following errors occur in this function.

GL_ERROR_8021_DMP0 was bound to the display target.
GL_ERROR_8022_DMPThe width or height argument was set to an invalid value.
GL_ERROR_8023_DMPThe format argument was set to an invalid value.
GL_ERROR_8024_DMPThe area argument was set to an invalid value.
GL_ERROR_8025_DMPFailed to allocate the display buffer.

Revision History

2010/09/28
Added Note about restricted ranges when allocating the buffer in VRAM.
2010/08/11
Revised the description of each format value.
2010/06/23
Added Note about allowed ranges when allocating the buffer in VRAM.
2010/03/17
Fixed an incorrect number of bits in the GL_RGB8_OES format; revised terminology.
2010/03/12
Added extended error codes.
2010/01/07
Initial version.

CONFIDENTIAL