nn::gd::CTR::Resource::MapTexture2DResource Member Functionstatic nnResult MapTexture2DResource( Texture2DResource * texture2DResource, s32 mipLevelIndex, MapUsage usage, void ** data );
| Name | Description | |
|---|---|---|
| in | texture2DResource | Specifies the pointer to the 2D texture resource for the data pointer being obtained. |
| in | mipLevelIndex | Specifies the pointer to the mipmap level index for the data pointer being obtained. If -1 is specified, the last mipmap level is used. |
| in | usage | Specifies how the resource is to be used. |
| out | data |
Specifies the address for storing the pointer to the obtained data. |
| Value | Description |
|---|---|
Result::IsSuccess |
Process was successful. |
ResultNullParameter |
NULL was specified for either texture2DResource or data. |
ResultInvalidMemoryRegion |
Either the resource memory type or the usage method is invalid. It might be that an attempt was made by MAP_WRITE_ONLY or MAP_READ_WRITE to get a memory region that was allocated to VRAM. |
ResultInvalidTextureMipLevelIndex |
mipLevelIndex is invalid. |
| ResultResourceAlreadyMapped | The resource has already been mapped. |
Obtains a data pointer for the specified resource.
User applications can directly edit only the memory region allocated for Memory::FCRAM. You must check that all 3D commands have executed using this function to prevent memory to be acquired from being modified by CPU execution.
CONFIDENTIAL