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 <CODE>nngxGetCmdlistParameteri</CODE> and get both the size of the accumulated 3D command buffer and the size of command requests. Set <SPAN class="argument">pname</SPAN> to <CODE>NN_GX_CMDLIST_USED_BUFSIZE</CODE> or <CODE>NN_GX_CMDLIST_USED_REQCOUNT</CODE> to get the size of the accumulated 3D command buffer or the number of accumulated command requests, respectively.
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 set to <CODE>0</CODE>. The size (in bytes) of the exported data is returned.
79            </P><P>
80You are expected to first call this function with <SPAN class="argument">data</SPAN> specified as <CODE>0</CODE>, then using the return value as the required data size (for exporting) allocate a data region, and finally call this function again. You can call <CODE>nngxImportCmdlist</CODE> to import and use the exported data.
81            </P><P>
82You must specify the combination of values without any conflict for the <SPAN class="argument">bufferoffset</SPAN>, <SPAN class="argument">buffersize</SPAN>, <SPAN class="argument">requestid</SPAN>, and <SPAN class="argument">requestsize</SPAN> arguments.
83            </P><P>
84When exporting command requests, you must start at a 3D command buffer address within the region used to execute the first 3D execution command.
85            </P><P>
86This function exports a 3D command buffer without checking its content; consequently, the exported data may not not behave correctly and errors may not be detected. To safely export data, we recommend that you use the save information obtained by <CODE>nngxStopCmdlistSave</CODE>. Alternatively, make sure 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 <CODE>nngxGetCmdlistParameteri</CODE>.
87            </P><P>
88The following errors occur in this function.
89<TABLE><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>Any of the command requests are 3D execution commands 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>Revision History</h2>
91    <div class="section">
92      <dl class="history">
93        <dt>2010/07/07</dt>
94<dd>Deleted potentially misleading explanation.
95        </dd>
96        <dt>2010/03/12</dt>
97<dd>Initial version.<br />
98        </dd>
99      </dl>
100    </div>
101  <hr><p>CONFIDENTIAL</p></body>
102</html>