nngxAddB2LTransferCommand Function

Syntax

NNGX_APICALL void NNGX_APIENTRY nngxAddB2LTransferCommand(
     const GLvoid * srcaddr,
     GLsizei srcwidth,
     GLsizei srcheight,
     GLenum srcformat,
     GLvoid * dstaddr,
     GLsizei dstwidth,
     GLsizei dstheight,
     GLenum dstformat,
     GLenum aamode,
     GLboolean yflip,
     GLsizei blocksize
);

Arguments

Name Description
in srcaddr Transfer source block image address.
in srcwidth Transfer source image width.
in srcheight Transfer source image height.
in srcformat Transfer source image pixel format.
out dstaddr Transfer destination linear image storage address.
in dstwidth Transfer destination image width.
in dstheight Transfer destination image height.
in dstformat Transfer destination image pixel format.
in aamode Antialias filter mode.
in yflip Whether to flip vertically when transferring images.
in blocksize Block image block size (8 or 32).

Return Values

There is no return value.

Description

This function adds a command to convert an image's format from block to linear before transferring it.

This function converts a block image to a linear image. (In other words, it converts from the format used for rendering to the format used for display.) Although the nngxTransferRenderImage function provides equivalent functionality, this function has more general uses. Also, like the nngxTransferRenderImage function, this function only adds a transfer request command without adding a 3D split command.

Specify the start address of the transfer source block image with the srcaddr argument. Specify the start address of the transfer destination linear image with the dstaddr argument. Both srcaddr and dstaddr must be 16-byte aligned.

Specify the original image's width and height in pixels with srcwidth and srcheight. Specify the transferred image's width and height in pixels with dstwidth and dstheight. These dimensions must all be multiples of the block size. The block size is either 8 or 32. However, if the transferred image uses 24 bits per pixel and a block size of 8, both the original and transferred images must have widths that are multiples of 16. This function neither converts nor transfers if any of the image dimensions is 0. The width and height of the transferred image must be less than or equal to the width and height of the original image.

Specify the pixel format of the original and transferred images with srcformat and dstformat. Specify the pixel format with one of the following macros.

GL_RGBA8_OES32-bit RGBA8
GL_RGB8_OES24-bit RGB8
GL_RGBA416-bit RGBA4
GL_RGB5_A116-bit RGBA5551
GL_RGB56516-bit RGB565

Conversions that increase the pixel size are not possible. For example, you cannot convert from a 24-bit format to a 32-bit format or from a 16-bit format to either a 24- or 32-bit format.

Specify the antialiasing filter mode with aamode. Specify the mode with one of the following macros.

NN_GX_ANTIALIASE_NOT_USEDNo antialiasing
NN_GX_ANTIALIASE_2x1Transfer with 2x1 antialiasing
NN_GX_ANTIALIASE_2x2Transfer with 2x2 antialiasing
When antialiasing is enabled, the transferred image is shrunk in half in the filtering direction. Specifically, 2x2 antialiasing shrinks the image in half vertically and horizontally, and 2x1 antialiasing shrinks the image in half horizontally.

The transferred image is flipped vertically when yflip is GL_TRUE. It is not flipped when yflip is GL_FALSE. Nonzero values are considered to be GL_TRUE.

Specify blocksize to be 8 or 32. When set to 8, the transfer source image is transferred with a block size of 8. When set to 32, the transfer source image is transferred with a block size of 32.

The following errors occur with this function.

GL_ERROR_807C_DMP0 is bound to the current command list or the command request queue is full.
GL_ERROR_807D_DMPsrcaddr or dstaddr is not 16-byte aligned.
GL_ERROR_807E_DMPblocksize is neither 8 nor 32.
GL_ERROR_807F_DMPThe aamode argument is set to an invalid value.
GL_ERROR_8080_DMPThe srcformat and dstformat arguments are set to invalid values.
GL_ERROR_8081_DMPThe dstformat argument has a larger pixel size than the srcformat argument.
GL_ERROR_8082_DMPThe srcwidth, srcheight, dstwidth, or dstheight argument is set to an invalid value.
GL_ERROR_8083_DMPThe width or height of the transferred image is larger than the original image.

Revision History

2010/09/15
Initial version.

CONFIDENTIAL