NNS_G3dPlttLoad

Syntax

#include <nnsys/g3d/kernel.h>
void
NNS_G3dPlttLoad(
    NNSG3dResTex* pTex,
    BOOL          exec_begin_end
);

Arguments

pTex Pointer to the texture resource.
exec_begin_end When TRUE, calls the TWL-SDK's GX_BeginLoadTexPltt and GX_EndLoadTexPltt functions.

Return Values

None.

Description

Loads the palette stored in the texture resource to the VRAM region indicated by the configured palette key. At the same time, sets the flag indicating that the palette in the texture resource has been loaded to VRAM. The palette key must be configured with the NNS_G3dPlttSetPlttKey function before calling this function. Because DMA transfer is used to load palettes, it is necessary to write the palettes back to memory using functions such as DC_Flush* and DC_Store* before calling this function.

When exec_begin_end is TRUE, the TWL-SDK's GX_BeginLoadTexPltt and GX_EndLoadTexPltt functions are called automatically before and after loading palette data to VRAM. When exec_begin_end is FALSE, the GX_BeginLoadTexPltt and GX_EndLoadTexPltt functions must be called on the user side. When continuously loading palette data, it is more efficient to designate FALSE in exec_begin_end and call the GX_BeginLoadTexPltt and GX_EndLoadTexPltt functions on the user side.

See Also

NNS_G3dPlttSetPlttKey
NNS_G3dPlttReleasePlttKey

Revision History

2008/06/20 Changed NITRO-SDK to TWL-SDK.
2008/01/23 Added description for using DMA transfer.
2004/08/02 Initial version.


CONFIDENTIAL