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>StartRecordingPackets</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>::StartRecordingPackets</CODE> Member Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14static <a href="../../../../nnResult/Overview.html">nnResult</a> StartRecordingPackets(
15     <a href="../../../../nn_types/u32.html">u32</a> * forceDirtyModuleFlag,
16     <a href="../../../../nn/gd/CTR/System/RecordingPacketUsage.html">RecordingPacketUsage</a> usage = RECORD_COMMAND_LIST_COPY
17);
18</pre>
19    </div>
20<h2>Parameters</h2>
21    <div class="section">
22      <table class="arguments">
23        <thead>
24          <tr>
25            <td width="15" />
26<th>Name</th>
27<td>Description</td>
28          </tr>
29        </thead>
30        <tr>
31<td>in</td>
32<th>forceDirtyModuleFlag</th>
33<td>Specifies the flag that sets reconfigurable status for the command of a particular module. Module status does not change when <CODE>NULL</CODE> is specified. If not an immediate function, the command is generated in the command buffer when the rendering command executes. Depending on the current status of the Gd API, commands generated by non-immediate functions do not always need to be sent following the call. The <SPAN class="argument">forceDirtyModuleFlag</SPAN> can be used at a time such as when you want to send a command of a module specified by the user by flag. The <CODE>StartRecordingPackets</CODE> function uses this flag to internally call the <CODE>ForceDirty</CODE> function.</td>
34        </tr>
35        <tr>
36<td>in</td>
37<th>usage</th>
38<td>If <CODE>RECORD_COMMAND_LIST_COPY</CODE> is specified, command packets are copied to another buffer. You can edit and execute command packets that are stored in a user buffer. When the command packets are executed, they are copied to the internal command buffer managed by GD functions. CPU time is necessary to copy these to the command buffer.</td>
39        </tr> </table>
40    </div>
41<h2>Return Values</h2>
42<div class="section">Returns the result of the operation. <br />
43      <table class="arguments">
44        <thead>
45          <tr>
46<th>Value</th>
47<td>Description</td>
48          </tr>
49        </thead>
50        <tr>
51<th><CODE>Result::IsSuccess</CODE></th>
52<td>Process was successful.</td>
53        </tr>
54        <tr>
55<th><CODE>ResultSystemAPacketIsAlreadyBeingRecorded</CODE></th>
56<td>Save has already started.</td>
57        </tr>
58        <tr>
59<th><CODE>ResultOutOfMemory</CODE></th>
60<td>Could not allocate memory.</td>
61        </tr>
62        <tr>
63<th><CODE>ResultSystemReceiveErrorFromGlGetError</CODE></th>
64<td>An error was generated by the <a href="../../../../nn_gx/nngxStartCmdlistSave.html"><CODE>nngxStartCmdlistSave</CODE></a> function.</td>
65        </tr>
66        <tr>
67<th><CODE>ResultInvalidParameter</CODE></th>
68<td>The parameter is invalid.</td>
69        </tr>
70      </table> </div>
71<h2>Description</h2>
72    <div class="section">
73<p>Starts saving the current command list object. <SPAN class="argument">forceDirtyModuleFlag</SPAN> can be specified by OR'ing <a href="../../../../nn/gd/CTR/System/Module.html">System::Module</a> enum members.</p><p>If saving other packets has already started, saving new packets does not start. If the function you tried to execute is not an immediate function, the command may not be generated even if executed between calls to <CODE>StartRecordingPackets</CODE> and <CODE>StopRecordingPackets</CODE>. (For example, nothing changes when you set a state that is already set. Use <CODE>forceDirtyModuleFlag</CODE> if you always want to generate a command for the executed function. </p><p>When saving packets, it is often more convenient to use immediate functions rather than conventional functions. Immediate functions allow you to control whether to save commands inside the saved packet. The Shader <CODE>uniform</CODE> variable has the same sort of functionality. <a href="../../../../nn/gd/CTR/ShaderStage/SetFloatConstantBuffer.html"><CODE>ShaderStage::SetFloatConstantBuffer</CODE></a>)</p><p>If <CODE>RECORD_3D_COMMAND_BUFFER_FOR_JUMP</CODE> is set for RecordingPacketUsage, the GD API will save only the 3D command buffer. A request is not inserted in the command request list in this case. In all other cases, an error occurs if the <a href="../../../../nn/gd/CTR/System/StopRecordingPackets.html"><CODE>System::StopRecordingPackets</CODE></a> has executed.</p><p>If <CODE>RECORD_COMMAND_LIST_NO_COPY</CODE> is specified, command packets are not copied. Instead, the ones already stored in the GD functions' internal command buffer are used. This speeds up the <CODE>System::StopRecordingPackets</CODE> and <a href="../../../../nn/gd/CTR/System/ReplayPackets.html"><CODE>System::ReplayPackets</CODE></a> functions by the amount of time that would have been spent copying command packets. However, command packets cannot be edited and executed, nor can they be reused after the command buffer is cleared.</p><p>If <CODE>RECORD_3D_COMMAND_BUFFER_FOR_JUMP</CODE> has been specified, the 3D command buffer being managed by GD is copied to another buffer. The GD API jumps to the copied command at the jump command inserted by the <a href="../../../../nn_gx/nngxAddSubroutineCommand.html">nngxAddSubroutineCommand()</a> function after <CODE>SystemReplayPackets()</CODE> executes.</p><!-- write here --></div>
74<h2>See Also</h2>
75    <div class="section">
76<p class="reference"><a href="../../../../nn/gd/CTR/System/GetCommandBufferOffset.html"><CODE>System::GetCommandBufferOffset</CODE></a><br /><a href="../../../../nn/gd/CTR/System/GetCommandBufferBaseAddress.html"><CODE>System::GetCommandBufferBaseAddress</CODE></a><br /><a href="../../../../nn/gd/CTR/System/StopRecordingPackets.html"><CODE>System::StopRecordingPackets</CODE></a><br /><a href="../../../../nn/gd/CTR/System/ReplayPackets.html"><CODE>System::ReplayPackets</CODE></a><br /><a href="../../../../nn/gd/CTR/System/ReleasePackets.html"><CODE>System::ReleasePackets</CODE></a><br /> </p>
77    </div>
78<h2>Revision History</h2>
79    <div class="section">
80      <dl class="history">
81        <dt>2011/02/17</dt>
82<dd>Initial version.<br />
83        </dd>
84      </dl>
85    </div>
86  <hr><p>CONFIDENTIAL</p></body>
87</html>