nngxSwapBuffersByAddress Function
NNGX_APICALL void NNGX_APIENTRY nngxSwapBuffersByAddress(
GLenum display,
const GLvoid * addr,
const GLvoid * addrB,
GLsizei width,
GLenum format
);
| Name | Description | |
|---|---|---|
| in | display | Display to show. |
| in | addr | The starting address of the buffer to display. |
| in | addrB | The starting address of the buffer to display for the right eye when stereoscopic display is enabled. |
| in | width | The number of pixels for the width of the display buffer. |
| in | format | The format of the display buffer. |
Presets the specified buffer for the display specified by display.
This function can be called at any time, and at the first V-Sync after this function has been called, content in the specified address is displayed. If this function is called multiple times before V-Sync occurs, it is the last call that is applied to each screen.
When NN_GX_DISPLAY0 is specified for display, the upper screen is swapped, and when NN_GX_DISPLAY1 is specified, the lower screen is swapped.
The starting address of the buffer to display is specified in addr. When stereoscopic display is enabled (when the display mode is NN_GX_DISPLAYMODE_STEREO), it is the address of the image to be displayed for the left eye. addr must be 16-byte aligned.
The starting address of the buffer to be displayed for the right eye is specified in addrB when stereoscopic display is enabled. addrB is only enabled for the upper screen. When stereoscopic display is disabled, or when NN_GX_DISPLAY1 is specified for display, addrB is ignored. addrB must be 16-byte aligned.
The number of pixels for the width of the display buffer is specified in width. width is not the size of the width of the LCD, it is the size of the width of the display buffer. The width in pixels for both the upper and lower LCD screens is 240. When you are displaying only a portion of a display buffer that is wider than 240 pixels, however, set the width to equal the number of pixels for the entire display buffer width (include the portions that won't be displayed). width must be a multiple of 8 and a value of at least 240 pixels.
Specifies the format of the display buffer in format. Specify one of the following.
GL_RGB8_OES | RGB8 (24-bit) |
|---|---|
GL_RGBA4 | RGBA4 (16-bit) |
GL_RGB5_A1 | RGB5A1 (16-bit) |
GL_RGB565 | RGB565 (16-bit) |
The display of the buffer resulting from this function is not affected by the display area specified by the settings of the nngxDisplayEnv function. Specify addresses for addr and addrB that consider their offsets and so on.
The following errors occur in this function.
GL_ERROR_8087_DMP | An invalid value was specified indisplay. |
|---|---|
GL_ERROR_8088_DMP | The alignment for addr was invalid. |
GL_ERROR_8089_DMP | The alignment for addrB was invalid. |
GL_ERROR_808A_DMP | An invalid value was specified for width. |
GL_ERROR_808B_DMP | An invalid value was specified for format. |
CONFIDENTIAL