nw::lyt::LoadTexture Function

Syntax

const TextureInfo LoadTexture(
     const void * pImgRes,
     u32 size,
     int texLoadFlag = 0
);

Arguments

Name Description
pImgRes Resource.
size Resource size.
texLoadFlag Flag for controlling the loading method.

Return Values

Returns texture information.

Description

Loads a texture.

If texLoadFlag is 0, the texture is loaded according the memory layout set for the texture resource. For information on the memory layout setting for the texture resource, see TexResource::SetImageArea().

NN_GX_MEM_FCRAM | GL_NO_COPY_FCRAM_DMP is specified if a memory layout is not specified by the texture resource.

Use DeleteTexture() to destroy textures loaded using this function.

If Layout::SetLayoutDrawEnable() is set to true, a DMPGL texture object is created.

If Layout::SetLayoutDrawEnable() is set to false, or if NW_LYT_DMPGL_ENABLED is undefined, the DMPGL texture object is not created. The TextureInfo texture object/field is used to maintain information required to destroy textures.

See Also

DeleteTexture
TexResource::SetImageArea
Layout::SetLayoutDrawEnable

Revision History

2009/09/18
Initial version.
2010/06/18
Added the texLoadFlag argument.
2011/02/28
Added information about memory layout according to texture resource settings.
Added information about DeleteTexture().

CONFIDENTIAL