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>nngxExportCmdlist</title> 8 </head> 9 <body> 10<h1><CODE>nngxExportCmdlist</CODE> Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14NNGX_APICALL GLsizei NNGX_APIENTRY nngxExportCmdlist( 15 GLuint cmdlist, 16 GLuint bufferoffset, 17 GLsizei buffersize, 18 GLuint requestid, 19 GLsizei requestsize, 20 GLsizei datasize, 21 GLvoid * data 22); 23</pre> 24 </div> 25<h2>Arguments</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>cmdlist</th> 38<td>Saved command list object.</td> 39 </tr> 40 <tr> 41<td>in</td> 42<th>bufferoffset</th> 43<td>Offset (in bytes) from the starting address of the 3D command buffer to the first address to export.</td> 44 </tr> 45 <tr> 46<td>in</td> 47<th>buffersize</th> 48<td>Size (in bytes) of the 3D command buffer to export.</td> 49 </tr> 50 <tr> 51<td>in</td> 52<th>requestid</th> 53<td>ID of the first command request to export.</td> 54 </tr> 55 <tr> 56<td>in</td> 57<th>requestsize</th> 58<td>Number of command requests to export.</td> 59 </tr> 60 <tr> 61<td>in</td> 62<th>datasize</th> 63<td>Size (in bytes) of the <SPAN class="argument">data</SPAN> region.</td> 64 </tr> 65 <tr> 66<td>in</td> 67<th>data</th> 68<td>Pointer to a region used to store the exported data.</td> 69 </tr> </table> 70 </div> 71<h2>Return Values</h2> 72<div class="section">There is no return value. </div> 73<h2>Description</h2> 74 <div class="section"> 75<p>Exports the specified command list as binary data in memory.</p><P> 76<SPAN class="argument">bufferoffset</SPAN> specifies the offset (in bytes) from the starting address of the 3D command buffer to the first address to export. <SPAN class="argument">buffersize</SPAN> specifies the number of bytes to export from the 3D command buffer. <SPAN class="argument">requestid</SPAN> specifies the ID of the first command request to export. Command request IDs start at 0 and increase sequentially in the order that commands are accumulated. <SPAN class="argument">requestsize</SPAN> specifies the number of command requests to export. To determine which values to specify for <SPAN class="argument">bufferoffset</SPAN>, <SPAN class="argument">buffersize</SPAN>, <SPAN class="argument">requestid</SPAN>, and <SPAN class="argument">requestsize</SPAN> while commands are accumulating, call the <CODE><a href="../nn_gx/nngxGetCmdlistParameteri.html">nngxGetCmdlistParameteri</a></CODE> function and get both the size of the accumulated 3D command buffer and the size of command requests. For <SPAN class="argument">pname</SPAN>, specify <CODE>NN_GX_CMDLIST_USED_BUFSIZE</CODE> to get the size of the accumulated 3D command buffer. Specify <CODE>NN_GX_CMDLIST_USED_REQCOUNT</CODE> to get the number of accumulated command requests. 77 </P><P> 78<SPAN class="argument">data</SPAN> specifies a pointer to a region used to store the exported data. <SPAN class="argument">datasize</SPAN> specifies the size (in bytes) of the <SPAN class="argument">data</SPAN> region. Nothing is exported if the <SPAN class="argument">data</SPAN> argument is <CODE>0</CODE>. The size (in bytes) of the exported data is returned. 79 </P><P> 80Typically, you would call this function, specifying <CODE>0</CODE> for <SPAN class="argument">data</SPAN>, to obtain the required data size for exporting, then you would allocate a data region and call this function again. You can call <CODE>nngxImportCmdlist</CODE> to import and use the exported data. 81 </P><P> 82You must specify a valid combination of values for the <SPAN class="argument">bufferoffset</SPAN>, <SPAN class="argument">buffersize</SPAN>, <SPAN class="argument">requestid</SPAN>, and <SPAN class="argument">requestsize</SPAN> parameters. 83 </P><P> 84When exporting command requests, you must start at a 3D command buffer address within the region executed by the first render command request among the command requests to export. 85 </P><P> 86This function exports a 3D command buffer without checking its content; consequently, the exported data may not behave correctly and errors may not be detected. To safely export data, we recommend that you use the save information obtained by the <CODE><a href="../nn_gx/nngxStopCmdlistSave.html">nngxStopCmdlistSave</a></CODE> function. Alternatively, Nintendo recommends that the pair of values you use for <SPAN class="argument">bufferoffset</SPAN> and <SPAN class="argument">requestid</SPAN>, as well as the pair of values you use for <SPAN class="argument">buffersize</SPAN> and <SPAN class="argument">requestsize</SPAN>, were obtained at the same time during the same call to the <CODE><a href="../nn_gx/nngxGetCmdlistParameteri.html">nngxGetCmdlistParameteri</a></CODE> function. 87 </P><P> 88The following errors occur in this function. 89<TABLE><TR><TH>GL_ERROR_803B_DMP</TH><TD>Invalid value specified for <SPAN class="argument">cmdlist</SPAN>.</TD></TR><TR><TH>GL_ERROR_803C_DMP</TH><TD>The size of data to export is greater than <span>datasize</span>.</TD></TR><TR><TH>GL_ERROR_803D_DMP</TH><TD>The <SPAN class="argument">bufferoffset</SPAN>, <SPAN class="argument">buffersize</SPAN>, <SPAN class="argument">requestid</SPAN>, and <SPAN class="argument">requestsize</SPAN> arguments specify a region without any accumulated commands.</TD></TR><TR><TH>GL_ERROR_803E_DMP</TH><TD>The <SPAN class="argument">bufferoffset</SPAN> or <SPAN class="argument">buffersize</SPAN> argument is not 8-byte aligned.</TD></TR><TR><TH>GL_ERROR_803F_DMP</TH><TD>The command request includes a render command request that was added using <CODE>nngxUseSavedCmdlist</CODE> without copying the 3D command buffer.</TD></TR><TR><TH>GL_ERROR_8040_DMP</TH><TD>The <SPAN class="argument">bufferoffset</SPAN> or <SPAN class="argument">buffersize</SPAN> argument has not properly specified the 3D command buffer that is used to run an exported 3D execution command.</TD></TR></TABLE></P></div> 90<h2>See Also</h2> 91 <div class="section"> 92<p class="reference"><a href="../nn_gx/nngxImportCmdlist.html"><CODE>nngxImportCmdlist</CODE></a><br /> </p> 93 </div> 94<h2>Revision History</h2> 95 <div class="section"> 96 <dl class="history"> 97 <dt>2012/02/03</dt> 98<dd>Fixed accidental omission of error code <CODE>GL_ERROR_803B_DMP</CODE>.<br /> 99 </dd> 100 <dt>2011/10/04</dt> 101<dd>Added <B>See Also</B> section.<br /> 102 </dd> 103 <dt>2010/07/07</dt> 104<dd>Deleted potentially misleading explanation. 105 </dd> 106 <dt>2010/03/12</dt> 107<dd>Initial version.<br /> 108 </dd> 109 </dl> 110 </div> 111 <hr><p>CONFIDENTIAL</p></body> 112</html>