kmGetTexture

Reads the texture in texture memory.


KMSTATUS KMAPI
kmGetTexture(
OUT PKMDWORD pTexture,
IN PKMSURFACEDESC pSurfaceDesc
)

Description:

This function reads the texture in texture memory specified by pSurfaceDesc to the main memory specified by pTexture. Only the texture pixel data of the KAMUI texture format is output. No header is appended. If SurfaceDesc of the frame buffer is specified for pSurfaceDesc, the contents of the specified frame buffer can be read into main memory.

If the start address of texture data in system memory is on a 32-byte boundary, and its size is a multiple of 32 bytes, the DMA mode is used to transfer the texture data to texture memory, so that high-speed transfer becomes possible.

Parameters:

pTexture(output)
This parameter is a pointer indicating the area in main memory where the texture is to be saved. Secure a multiple of 32 bytes, aligned with a 32-byte boundary. (Read destination)

pSurfaceDesc(input)
Texture surface to which the texture is saved. This parameter is a pointer to KMSURFACEDESC-type structure. (Read source)

Return values:

ValueExplanation
KMSTATUS_SUCCESS Read successfully.
KMSTATUS_INVALID_ADDRESS Specified texture surface is not allocated.

  kmGetTexture