kmuCreateTwiddledTexture

Converts KAMUI Bit Map Format to Twiddled Format


KMSTATUS KMAPI
kmuCreateTwiddledTexture(
OUT PKMDWORD pOutputTexture,
IN PKMDWORD pInputTexture,
IN KMBOOLEAN bAutoMipMap,
IN KMBOOLEAN bDither,
IN KMINT32 USize,
IN KMTEXTURETYPE nTextureType
)

Description:

This function converts a texture in KM_TEXTURE_BMP format (ABGR8888) in main memory into a texture in Twiddled/Twiddled Mipmap format. If TRUE is specified for bAutoMipMap, a mipmap is created automatically. If TRUE is specified for bDither, dither is effected.

Caution:

The contents of the input texture data are destroyed if mipmap or dither is specified.

Parameters:

pOutputTexture(output)
Address in main memory to which converted texture data is to be written

pInputTexture(input)
This parameter is a pointer indicating an input texture in KM_TEXTURE_BMP format.

bAutoMipMap(input)
This parameter specifies whether a mipmap is created automatically. If TRUE is specified, a mipmap is automatically created (the output is in KM_TEXTURE_TWIDDLED_MM format).
If FALSE is specified, a mipmap is not created (output is in KM_TEXTURE_TWIDDLED format).

bDither(input)
This parameter specifies whether dither is effected. If TRUE is specified, dither is effected.

USize(input)
This parameter specifies the number of texels per side of texture. Select one of the following:
KM_MAPSIZE_88x8 texels
KM_MAPSIZE_1616x16 texels
KM_MAPSIZE_3232x32 texels
KM_MAPSIZE_6464x64 texels
KM_MAPSIZE_128128x128 texels
KM_MAPSIZE_256256x256 texels
KM_MAPSIZE_512512x512 texels
KM_MAPSIZE_10241024x1024 texels


nTextureType(input)
This parameter specifies the pixel format of the converted texture. Select one of the following:
KM_TEXTURE_ARGB1555ARGB-1555 format
KM_TEXTURE_RGB565RGB-565 format
KM_TEXTURE_ARGB4444ARGB-4444 format


Return values:

ValueExplanation
KMSTATUS_SUCCESS Success
KMSTATUS_INVALID_TEXTURE_TYPE Invalid texture type specified.

  kmuCreateTwiddledTexture