kmCreateFixedTextureArea

Secures the fixed texture area.

KMSTATUS KMAPI
kmCreateFixedTextureArea(
OUT PKMSURFACEDESC pSurfaceDesc,
IN KMINT32 nWidth,
IN KMINT32 nHeight,
IN KMTEXTURETYPE nTextureType
)

Description:

This function secures the fixed texture area which will not be lost even when the kmSetSystemConfiguration function is issued. The fixed texture area can be used to hold the font texture, etc, for use through out the game. The area secured here can only be released by using the kmFreeFixedTextureArea function. In fact, when this function is used, all fixed texture areas are released at the same time. It is not possible to select and release an individual fixed texture area.
Actually, the fixed texture area is secured when the kmSetSystemConfiguration function is issued. After this function is called, the kmSetSystemConfiguration function must also be called. Also, data write to the fixed texture area must be performed after the kmSetSystemConfiguration function.
In other words, the order in calling the functions are as follows:
(1) Run the kmCreateFixedTextureArea function to secure the fixed texture area. (It can be run multiple times.)
(2) Run the kmSetSystemConfiguration to actually secure the fixed texture areas.
(3) Run the kmLoadTexture function, etc. to read texture data into the fixed texture areas.
Before issuing the kmSetSystemConfiguration function, if the kmFreeFixedTextureArea function has already been issued, the kmCreateFixedTextureArea function will become ignored if it has been issued. In this case, the fixed texture area is completely not secured.
Also, the area secured here does not become the target for garbage collection, and the total capacity of the fixed texture area must not exceed 4MB.

Parameters:

pSurfaceDesc(output)
This parameter is a pointer to the KMSURFACEDESC-type structure. Kamui returns the surface information to this structure. If KMSTATUS_NOT_ENOUGH_MEMORY is returned to KMSTATUS, then it is not definite.
nWidth, nHeight(input)
This parameter specifies the horizontal and vertical sizes of the texture. In the case that MIPMAP is used, it specifies the top-level texture size. While square texture with size ranging from 8x8 to 1024x1024 can be used, nWidth and nHeight are limited to 8, 16, 32, 64, 128, 256, 512, or 1024.
nTextureType(input)
This parameter specifies a texture format. See KmCreateTextureSurface.

Return values:

Value | Explanation
--- | ---
KMSTATUS_SUCCESS | Success
KMSTATUS_NOT_ENOUGH_MEMORY | The total capacity of the fixed texture area has exceeded 4MB.

kmCreateFixedTextureArea