nngxTransferLinearImage Function
NNGX_APICALL void NNGX_APIENTRY nngxTransferLinearImage(
const GLvoid * srcaddr,
GLuint dstid,
GLenum target
);
| Name | Description | |
|---|---|---|
| in | srcaddr | Transfer source address. |
| in | dstid | Transfer destination object ID. |
| in | target | Transfer destination object type. |
Adds a command to transfer an image to the specified render buffer or texture.
Adds a command to the current command list to transfer the data in the memory region specified in srcaddr to the render buffer or texture specified in dstid.
The meaning of the value in dstid changes depending on the value specified in target.
| target | dstid |
|---|---|
| GL_RENDERBUFFER | If the render buffer object specifies 0, it indicates the color buffer that is attached to the current framebuffer. |
| GL_TEXTURE_2D | 2D texture object. |
|
GL_TEXTURE_CUBE_MAP_POSITIVE_X GL_TEXTURE_CUBE_MAP_NEGATIVE_X GL_TEXTURE_CUBE_MAP_POSITIVE_Y GL_TEXTURE_CUBE_MAP_NEGATIVE_Y GL_TEXTURE_CUBE_MAP_POSITIVE_Z GL_TEXTURE_CUBE_MAP_NEGATIVE_Z | Cube map texture object. |
The memory region specified in srcaddr stores image data of the same format, width, and height as the render buffer or texture specified in dstid. The transfer source image data is converted to PICA native format block addressing and transferred to the target memory region. When the transfer destination object is a render buffer, the block addressing conversion is either to 8-block or 32-block addressing, depending on the block format settings when this function is called. When the transfer destination object is a texture, the conversion is to 8-block addressing.
Data conversion via this function is only of the addressing, and does nothing to flip vertically or change the byte order. The render buffer and texture are based on the PICA native format image specification, so transfer source image data might need to be flipped vertically or have its byte order converted before calling this function.
If unsplit commands have already been accumulated in the current 3D command list, the function adds a split command and then adds the transfer command.
If the transfer destination format is 24-bit, the transfer source data must be in 32-bit format, with the first byte of every four bytes of the transfer source data split and then transferred. (The hardware does not support transferring 24-bit format to 24-bit format.)
The following errors occur in this function.
| GL_ERROR_805B_DMP | 0 is bound to the current command list. |
|---|---|
| GL_ERROR_805C_DMP | The current command list has already accumulated the maximum number of command requests. |
| GL_ERROR_805D_DMP | The current 3D command buffer is too small. |
| GL_ERROR_805E_DMP | The render buffer or texture specified in dstid does not exist, or the address is not allocated. |
| GL_ERROR_805F_DMP | Either the transfer destination render buffer width or height is less than 128, or the block format when this function was called is not a multiple of 8 for 8-bit block format, or a multiple of 32 for 32-bit block format. |
| GL_ERROR_8060_DMP | target was set to an invalid value. |
| GL_ERROR_8067_DMP | The pixel size of the destination target buffer or texture is not 32-, 24-, or 16-bit. |
CONFIDENTIAL