nn::gd::CTR::Resource::CreateVertexBufferResource Member Functionstatic nnResult CreateVertexBufferResource( const VertexBufferResourceDescription * description, const void * initialData, VertexBufferResource ** buffer, gdBool copyInitialData = GD_TRUE );
| Name | Description | |
|---|---|---|
| in | description | Specifies the descriptor for creating a resource buffer. |
| in | initialData | Specifies the initialization data. |
| out | buffer | Specifies the address for storing the pointer to the created vertex buffer resource. |
| in | copyInitialData | This parameter is used when initialization data is specified. The default is true. When this parameter is true, a memory area is allocated in the function (either FCRAM or VRAM specified by the descriptor), and then the initialization data is copied to the allocated memory. When this parameter is false, the vertexBufferResource memory address becomes the one allocated by the user (the address of initialData). In this case, the user must allocate a sufficient memory area with the correct memory alignment. If resources use some mipmaps, sufficient memory area must be allocated to all the mipmaps. Also, the user is responsible for releasing the data memory area after releasing the resource. |
| Value | Description |
|---|---|
| Result::IsSuccess | The process was successful. |
| ResultNullParameter | NULL was specified for description or buffer. |
ResultInvalidParameter |
0 was specified for the vertex size. |
ResultInvalidMemoryLocation |
The memory type is not valid. |
ResultOutOfMemory |
Memory cannot be allocated for the resource object. |
ResultOutOfMemoryExt |
Memory cannot be allocated for the vertex buffer. |
Creates a vertex buffer resource.
This function is used to create both vertex buffers and index buffers.
This function adds commands to the command list. For more information, see the programming manual.
CONFIDENTIAL