nn::gd::CTR::System::DrawImmediateIndexed Member Function
static void DrawImmediateIndexed(
u32 indexCount,
u32 startIndexLocation,
void ** vertexBuffers,
u32 * offsets,
void * indexBuffer,
nn::gd::CTR::VertexInputStage::IndexFormat format,
u32 indexOffset
);
| Name | Description | |
|---|---|---|
| in | indexCount |
Specifies the render index count. |
| in | startIndexLocation |
Specifies the start index of the index buffer. The first index address used for rendering is calculated in byte units as follows. 'indexBuffer' + 'indexOffset' + 'startIndexLocation' * ('format'==INDEX_FORMAT_UBYTE? 1 : 2) |
| in | vertexBuffers |
Specifies the position array of vertex attributes to be used. The array defined by InputLayout attached with VertexInputStage and the number of the arrays being used must match. |
| in | offsets |
Specifies an array of offsets to the position. Each offset (given as a number of bytes) specifies the read position inside each instance of vertex buffer data. If NULL is specified for this variable, 0 is used as the offset for each instance of vertex buffer data. |
| in | indexBuffer |
Specifies the index buffer. |
| in | format |
Specifies the index data format. (IndexFormat). |
| in | indexOffset |
Specifies the offset (in bytes) of the start index used for the index buffer array. A 0 is specified for indexOffset if the situation is such that the indexBuffer directly specifies index 0. The first index address used for rendering is calculated in byte units as follows. 'indexBuffer' + 'indexOffset' + 'startIndexLocation' * ('format'==INDEX_FORMAT_UBYTE? 1 : 2) |
Sets a render mode that does not use the vertex buffer resource in VertexInputStage.
This function is the same as the DrawImmediate function, except for the use of an index buffer ( DrawImmediate.) Vertext buffer attribute data is copied to the command buffer by passing it using function parameters. This function is very easy to use because there is no need to create a vertex buffer resource and set it in VertexInputStage. Unlike the vertex buffer resource, buffer data can be released and used again soon after rendering. However, rendering is slower.
Because a vertex buffer cannot be used with reserved geometry shader silhouettes, subdivisions, and looped subdivisions, an ASSERT occurs if DrawImmediate executes in Debug mode with Immediate Vertex Buffer set.
Although this function does not itself return errors, if an error occurs in the rendering process, the callback set by the nn::gd::CTR::System::SetCallbackFunctionError function is called.
The errors generated are as shown below.
CONFIDENTIAL