nn::gd::CTR::Resource::Helper::ConvertTextureResourceToNativeFormat Member Functionstatic nnResult ConvertTextureResourceToNativeFormat( Format format, u32 width, u32 height, const u8 * dataSrc, u8 * dataDst, NativeFormat * pnativeFormat = NULL );
| Name | Description | |
|---|---|---|
| in | format | Specifies the pixel format of dataSrc. The formats that can be specified are mentioned elsewhere in this section. |
| in | width | Specifies the data width. |
| in | height | Specifies the data height. |
| in | dataSrc | Specifies the address of the source data for the conversion. |
| in | dataDst | Specifies the destination address for the converted data. |
| in | pnativeFormat | Specifies the address that will store the native format value received after conversion. This will not be used if NULL is specified. |
| Value | Description |
|---|---|
Result::IsSuccess |
Process was successful. |
ResultNullParameter |
NULL was specified for either dataSrc or dataDst. |
ResultInvalidTextureResolution |
Either 0 was specified for width or height, or the size is not a multiple of 8. This result will also be returned if format is invalid. |
ResultOutOfMemory |
Could not obtain memory. |
ResultInvalidTextureFormat |
Invalid pixel format. |
Converts the texture data into a native format.
You can specify the following pixel formats in format.Resource::FORMAT_RGBA_8888Resource::FORMAT_RGB_888Resource::FORMAT_RGBA_5551Resource::FORMAT_RGB_565Resource::FORMAT_RGBA_4444Resource::FORMAT_LUMINANCE_ALPHA_88Resource::FORMAT_HILO_88Resource::FORMAT_LUMINANCE_8Resource::FORMAT_ALPHA_8Resource::FORMAT_LUMINANCE_ALPHA_44Resource::FORMAT_LUMINANCE_4Resource::FORMAT_ALPHA_4
CONFIDENTIAL