nngxSwapBuffers Function

Syntax

NNGX_APICALL void NNGX_APIENTRY nngxSwapBuffers(
     GLenum display
);

Arguments

Name Description
in display Display to show.

Return Values

There is no return value.

Description

Presets the display buffer bound to the display to be shown.

Set display to NN_GX_DISPLAY0, NN_GX_DISPLAY1, or NN_GX_DISPLAY_BOTH to show screen 0, screen 1, or both, respectively.

This function sets the address for the display buffer to be shown in the hardware. The value ultimately set in the hardware for the display buffer is calculated from data that includes the address allocated by the nngxDisplaybufferStorage function, the display buffer resolution, the pixel size, the LCD resolution, and the offset value set by the nngxDisplayEnv function. The address set in the hardware must be 16-byte aligned.

Specify NN_GX_DISPLAY0 for the display argument when the upper-screen display mode set by the nngxSetDisplayMode function is NN_GX_DISPLAYMODE_STEREO to preset the display with the display buffer bound to NN_GX_DISPLAY0 for the left eye and to NN_GX_DISPLAY0_EXT for the right eye.

The following errors occur in this function.

GL_ERROR_8030_DMPInvalid value specified for display (Including when NN_GX_DISPLAY0_EXT was specified.))
GL_ERROR_8031_DMPEither 0 is bound to the current display buffer, or no memory has been allocated for the display buffer.
GL_ERROR_8031_DMPThe starting display coordinates specified by nngxDisplayEnv point outside of the display buffer.
GL_ERROR_8053_DMPThe final display buffer address calculated from the offset value specified by the nngxDisplayEnv function was not 16-byte aligned.
GL_ERROR_9000_DMPWhen the display mode is set to NN_GX_DISPLAYMODE_STEREO, either 0 is bound to NN_GX_DISPLAY0_EXT or no memory has been allocated for the display buffer.
GL_ERROR_9001_DMPWhen the display mode is set to NN_GX_DISPLAYMODE_STEREO, the display region specified by nngxDisplayEnv lies outside the display buffer.
GL_ERROR_9002_DMPWhen the display mode is set to NN_GX_DISPLAYMODE_STEREO, either the display buffer resolutions, formats, or memory regions for the display buffers bound to NN_GX_DISPLAY0 and NN_GX_DISPLAY0_EXT do not match.

Revision History

2010/04/14
Added descriptions of display modes and of address restrictions for display buffers.
2010/03/12
Added extended error codes.
2010/01/07
Initial version.

CONFIDENTIAL