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 (parallel to the scan lines).
in height Display buffer height (perpendicular to the 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_RGB8_OESRGB8 (24 bits)
GL_RGBA4RGBA4 (16 bits)
GL_RGB5_A1RGBA5551 (16 bits)
GL_RGB565RGB565 (16 bits)

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: When you allocate the display buffer in VRAM, do not place it within the last 1.5 MB of the region for either the A channel or B channel.
In Development and Debug builds, if the allocated display buffer overlaps with these regions at all and nngxSwapBuffers is called, an assert occurs.

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

2011/07/04
Added a note about the assert issued on memory allocated for the display buffer.
2011/02/01
Deleted RGBA8 format.
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