1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../../../css/manpage.css" type="text/css" /> 7<title>DrawImmediateIndexed</title> 8 </head> 9 <body> 10<h1><CODE><a href="../../../../nn/Overview.html">nn</a>::<a href="../../../../nn/gd/Overview.html">gd</a>::<a href="../../../../nn/gd/CTR/Overview.html">CTR</a>::<a href="../../../../nn/gd/CTR/System/Overview.html">System</a>::DrawImmediateIndexed</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14static void DrawImmediateIndexed( 15 <a href="../../../../nn_types/u32.html">u32</a> indexCount, 16 <a href="../../../../nn_types/u32.html">u32</a> startIndexLocation, 17 void ** vertexBuffers, 18 <a href="../../../../nn_types/u32.html">u32</a> * offsets, 19 void * indexBuffer, 20 <a href="../../../../nn/gd/CTR/VertexInputStage/IndexFormat.html">nn::gd::CTR::VertexInputStage::IndexFormat</a> format, 21 <a href="../../../../nn_types/u32.html">u32</a> indexOffset 22); 23</pre> 24 </div> 25<h2>Parameters</h2> 26 <div class="section"> 27 <table class="arguments"> 28 <thead> 29 <tr> 30 <td width="15" /> 31<th>Name</th> 32<td>Description</td> 33 </tr> 34 </thead> 35 <tr> 36<td>in</td> 37<th><CODE>indexCount</CODE></th> 38<td>Specifies the render index count.</td> 39 </tr> 40 <tr> 41<td>in</td> 42<th><CODE>startIndexLocation</CODE></th> 43<td>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)</td> 44 </tr> 45 <tr> 46<td>in</td> 47<th><CODE>vertexBuffers</CODE></th> 48<td>Specifies the position array of vertex attributes to be used. The array defined by <CODE>InputLayout</CODE> attached with <CODE>VertexInputStage</CODE> and the number of the arrays being used must match.</td> 49 </tr> 50 <tr> 51<td>in</td> 52<th><CODE>offsets</CODE></th> 53<td>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 <CODE>NULL</CODE> is specified for this variable, <CODE>0</CODE> is used as the offset for each instance of vertex buffer data.</td> 54 </tr> 55 <tr> 56<td>in</td> 57<th><CODE>indexBuffer</CODE></th> 58<td>Specifies the index buffer.</td> 59 </tr> 60 <tr> 61<td>in</td> 62<th><CODE>format</CODE></th> 63<td>Specifies the index data format. (IndexFormat).</td> 64 </tr> 65 <tr> 66<td>in</td> 67<th><CODE>indexOffset</CODE></th> 68<td>Specifies the offset (in bytes) of the start index used for the index buffer array. A 0 is specified for <CODE>indexOffset</CODE> if the situation is such that the <CODE>indexBuffer</CODE> directly specifies <CODE>index 0</CODE>. The first index address used for rendering is calculated in byte units as follows. 'indexBuffer' + 'indexOffset' + 'startIndexLocation' * ('format'==INDEX_FORMAT_UBYTE? 1 : 2)</td> 69 </tr> </table> 70 </div> 71<h2>Return Values</h2> 72 <div class="section"> 73None. 74 </div> 75<h2>Description</h2> 76 <div class="section"> 77<p>Sets a render mode that does not use the vertex buffer resource in <CODE>VertexInputStage</CODE>. </p><p>This function is the same as the <CODE>DrawImmediate</CODE> function, except for the use of an index buffer ( <a href="../../../../nn/gd/CTR/System/DrawImmediate.html">DrawImmediate.</a>) 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 <CODE>VertexInputStage</CODE>. Unlike the vertex buffer resource, buffer data can be released and used again soon after rendering. However, rendering is slower. </p><p>Because a vertex buffer cannot be used with reserved geometry shader silhouettes, subdivisions, and looped subdivisions, an <CODE>ASSERT</CODE> occurs if <CODE>DrawImmediate</CODE> executes in Debug mode with <CODE>Immediate Vertex Buffer</CODE> set. </p><p> 78Although this function does not itself return errors, if an error occurs in the rendering process, the callback set by the <a href="../../../../nn/gd/CTR/System/SetCallbackFunctionError.html"><CODE>nn::gd::CTR::System::SetCallbackFunctionError</CODE></a> function is called. <br />The errors generated are as shown below. 79 80<table><tr><th>Value</th></tr><tr><td><a href="../../../../nn/gd/CTR/ResultSystemGeometryShaderIncompatibleWithImmediateDraw/Overview.html"><CODE>nn::gd::CTR::ResultSystemGeometryShaderIncompatibleWithImmediateDraw</CODE></a></td></tr><tr><td><a href="../../../../nn/gd/CTR/ResultInvalidMemoryLayout/Overview.html"><CODE>nn::gd::CTR::ResultInvalidMemoryLayout</CODE></a></td></tr><tr><td><a href="../../../../nn/gd/CTR/ResultDifferentRenderTargetAndDepthStencilTargetResolution/Overview.html"><CODE>nn::gd::CTR::ResultDifferentRenderTargetAndDepthStencilTargetResolution</CODE></a></td></tr><tr><td><a href="../../../../nn/gd/CTR/ResultNoTextureBound/Overview.html"><CODE>nn::gd::CTR::ResultNoTextureBound</CODE></a></td></tr><tr><td><a href="../../../../nn/gd/CTR/ResultNoTextureCoordinates/Overview.html"><CODE>nn::gd::CTR::ResultNoTextureCoordinates</CODE></a></td></tr><tr><td><a href="../../../../nn/gd/CTR/ResultInvalidTextureUnitId/Overview.html"><CODE>nn::gd::CTR::ResultInvalidTextureUnitId</CODE></a></td></tr><tr><td><a href="../../../../nn/gd/CTR/ResultInvalidTextureFormat/Overview.html"><CODE>nn::gd::CTR::ResultInvalidTextureFormat</CODE></a></td></tr><tr><td><a href="../../../../nn/gd/CTR/ResultAlreadyReleased/Overview.html"><CODE>nn::gd::CTR::ResultAlreadyReleased</CODE></a></td></tr><tr><td><a href="../../../../nn/gd/CTR/ResultNullParameter/Overview.html"><CODE>nn::gd::CTR::ResultNullParameter</CODE></a></td></tr></table></p></div> 81<h2>Revision History</h2> 82 <div class="section"> 83 <dl class="history"> 84 <dt>2012/08/08</dt> 85<dd>Added a Result value that might be passed to the callback when an error occurs. 86 </dd> 87 <dt>2011/07/27</dt> 88<dd>Initial version.<br /> 89 </dd> 90 </dl> 91 </div> 92 93 <hr><p>CONFIDENTIAL</p></body> 94</html>