nn::gd::CTR::Memory::GenerateMipMaps Member Function

Syntax

static nnResult GenerateMipMaps(
     const Texture2DResource * tex2DResource,
     u32 mipLevelSourceIndex,
     s32 mipLevelLastDestinationIndex
);

Parameters

Name Description
in tex2DResource Specifies the source Texture2DResource resource.
in mipLevelSourceIndex Specifies the index of the mipmap level of the source.
in mipLevelLastDestinationIndex Specifies the index of the last mipmap level of the destination. If -1 is specified, the last mipmap level index is used.

Return Values

Returns the result of the operation.
Value Description
Result::IsSuccess Process was successful.
ResultNullParameter NULL was specified for the specified Texture2DResource resource.
ResultInvalidTextureMipLevelIndex The mipmap index is invalid.
ResultInvalidTextureFormat The specified resource pixel format size is invalid. Specify a pixel format size of 32, 24, or 16.
ResultInvalidTextureResolution The resolution of the smallest mipmap level is 32 bytes when the pixel format size of the specified format is 32 bits or 24 bits, but is 64 bytes when the pixel format size is 16 bits.
ResultInvalidTextureMipLevelIndexForMipmapAutoGeneration The last mipmap level generated must have a resolution of 32 bits or better if the pixel format is 32 or 24, or a resolution of 64 bits or better if the pixel format is 16.

Description

Creates a Texture2DResource resource mipmap.

Pixel formats that can be specified:
NATIVE_FORMAT_RGBA_8888
NATIVE_FORMAT_RGB_888
NATIVE_FORMAT_RGBA_4444
NATIVE_FORMAT_RGBA_5551
NATIVE_FORMAT_RGB_565
If the pixel format of the Texture2DResource resource is 24 or 32 bits, the data size for the mipmap level to be created is either larger than that or 32x32. If the pixel format of the Texture2DResource resource is 16 bits, the data size for the mipmap level to be created is either larger than that or 64x64. A function with the same functionality as nngxFilterBlockImage is called internally.
This function is added to the command list. Refer to the Programming Manual for details.

Revision History

2011/02/17
Initial version.

CONFIDENTIAL