nn::gd::CTR::System::DrawImmediate Member Function
static void DrawImmediate(
u32 vertexCount,
u32 startVertexLocation,
void ** vertexBuffers,
u32 * offsets
);
| Name | Description | |
|---|---|---|
| in | vertexCount |
Specifies the number of vertices to render. |
| in | startVertexLocation |
Specifies the start index of the vertex buffer. |
| in | vertexBuffers |
Specifies the position array of vertex data 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. |
Sets a render mode that does not use the vertex buffer resource in VertexInputStage.
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