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>DrawImmediate</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>::DrawImmediate</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14static void DrawImmediate( 15 <a href="../../../../nn_types/u32.html">u32</a> vertexCount, 16 <a href="../../../../nn_types/u32.html">u32</a> startVertexLocation, 17 void ** vertexBuffers, 18 <a href="../../../../nn_types/u32.html">u32</a> * offsets 19); 20</pre> 21 </div> 22<h2>Parameters</h2> 23 <div class="section"> 24 <table class="arguments"> 25 <thead> 26 <tr> 27 <td width="15" /> 28<th>Name</th> 29<td>Description</td> 30 </tr> 31 </thead> 32 <tr> 33<td>in</td> 34<th><CODE>vertexCount</CODE></th> 35<td>Specifies the number of vertices to render.</td> 36 </tr> 37 <tr> 38<td>in</td> 39<th><CODE>startVertexLocation</CODE></th> 40<td>Specifies the start index of the vertex buffer.</td> 41 </tr> 42 <tr> 43<td>in</td> 44<th><CODE>vertexBuffers</CODE></th> 45<td>Specifies the position array of vertex data 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> 46 </tr> 47 <tr> 48<td>in</td> 49<th><CODE>offsets</CODE></th> 50<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> 51 </tr> </table> 52 </div> 53<h2>Return Values</h2> 54 <div class="section"> 55None. 56 </div> 57<h2>Description</h2> 58 <div class="section"> 59<p>Sets a render mode that does not use the vertex buffer resource in <CODE>VertexInputStage</CODE>. </p><p>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> 60Although 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. 61 62<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> 63<h2>Revision History</h2> 64 <div class="section"> 65 <dl class="history"> 66 <dt>2012/08/08</dt> 67<dd>Added a Result value that might be passed to the callback when an error occurs. 68 </dd> 69 <dt>2011/07/27</dt> 70<dd>Initial version.<br /> 71 </dd> 72 </dl> 73 </div> 74 <hr><p>CONFIDENTIAL</p></body> 75</html>