nngxAddBlockImageCopyCommand Function

Syntax

NNGX_APICALL void NNGX_APIENTRY nngxAddBlockImageCopyCommand(
     const GLvoid * srcaddr,
     GLsizei srcunit,
     GLsizei srcinterval,
     GLvoid * dstaddr,
     GLsizei dstunit,
     GLsizei dstinterval,
     GLsizei totalsize
);

Arguments

Name Description
in srcaddr Transfer source start address.
in srcunit Transfer source read unit size (in bytes)
in srcinterval Transfer source skip size (in bytes)
out dstaddr Transfer destination start address.
in dstunit Transfer destination write unit size (in bytes)
in dstinterval Transfer destination skip size (in bytes)
in totalsize Total transfer size in bytes (multiple of 16)

Return Values

There is no return value.

Description

Adds a block image transfer command.

This function can copy images between the rendering buffer and a texture buffer. This function’s distinguishing feature is its ability to transfer a specified amount of data with a specified skip size. This allows you to cut a region out of the original image or fit an image into a partial region of the target image.

The srcaddr argument specifies the start address of the transfer source. The dstaddr argument specifies the start address of the transfer destination. Both srcaddr and dstaddr must be 16-byte aligned.

The total number of bytes to transfer is specified by totalsize. The totalsize argument must be a multiple of 16.

The srcunit and srcinterval arguments specify the transfer source read unit size and skip size in bytes. The function first reads and transfers the number of bytes specified in srcunit. It then skips the number of bytes specified in srcinterval, which moves the read address forward and omits that many bytes from the transfer. The function repeats this process. The function completes after transfering the number of bytes specified in totalsize. If srcinterval is 0, this function reads and transfers a continuous region of totalsize bytes. For any other srcinterval value, data is alternatively read and skipped. This allows you to transfer partial regions from the original image.

The transferred data is written dstunit bytes at a time with a skip size of dstinterval bytes. The function writes the number of bytes of transferred data specified in dstunit. It then skips the write address forward by the number of bytes specified in dstinterval. The function repeats this process. The function completes after the number of transferred bytes reaches the value specified in totalsize. If dstinterval is 0, this function writes a continuous region of totalsize bytes. For any other dstinterval value, data is alternatively written and skipped. This allows you to paste an image into a partial region of the target image.

The srcunit, srcinterval, dstunit, and dstinterval arguments must be a multiple of 16. You cannot specify values of 0x100000 or higher. In addition, you cannot specify negative values.

The following errors occur with this function.

GL_ERROR_8074_DMP0 is bound to the current command list or the command request queue is full.
GL_ERROR_8075_DMPsrcaddr or dstaddr is not 16-byte aligned.
GL_ERROR_8076_DMPThe totalsize argument is not a multiple of 16.
GL_ERROR_8077_DMPThe srcunit, srcinterval, dstunit, or dstinterval argument values are invalid.

When you set this function’s arguments to transfer a block image from a rendering buffer: 1) the image’s starting address is at its upper-left corner, and 2) when the block size is 8 the data is placed in 8x8 pixel blocks. For more details about block formats, see the section on the native PICA format in the DMPGL 2.0 Specifications.

Revision History

2010/09/15
Initial version.

CONFIDENTIAL