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"> 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/document.css" type="text/css" /> 7 <title>Graphix Library (gfx) Sample Demos</title> 8 </head> 9 <body> 10 <h1>UserRenderNodeDemo</h1> 11 <div class="section"><img src="images/UserRenderNodeDemo.png" border="0" width="400" height="240" /></div> 12 <h2>Overview</h2> 13 <p> 14 This demo displays a model using the CTR-SDK GR library inside render commands set for user-defined render nodes. 15 </p> 16 <h2>How to Use</h2> 17 <p> 18 <ul> 19 <li>Demo-specific operations</li> 20 <ul> 21 <li>None.</li> 22 </ul> 23 <li>Common Operations</li> 24 <ul> 25 <li>Slide pad: Rotate the camera</li> 26 <li>Slide pad + A Button: Move the camera back and forth</li> 27 <li>Slide pad + B Button: Move the camera in parallel</li> 28 <li>Slide pad + Y Button: Move the camera up and down</li> 29 <li>X Button: Reset the camera position</li> 30 <li>START Button: Restart the demo.</li> 31 </ul> 32 </ul> 33 </p> 34 <h2>Description</h2> 35 <p> 36 One method of rendering by jointly using NintendoWare with other libraries uses <a href="../../../nw/gfx/RenderCommand/Overview.html">RenderCommand</a> Rendering by the CTR-SDK GR library is performed using <a href="../../../nw/gfx/UserRenderNode/Overview.html">UserRenderNode</a>. <a href="../../../nw/gfx/UserRenderNode/Overview.html">UserRenderNode</a> supports the use of RenderCommand in UserRenderNodeDemo. For details on RenderCommand, see <a href="../../nw/gfx/SceneBuilder/IsFixedSizeMemory.html">Interrupt Processing During Rendering</a>. 37 </p> 38 <p> 39 User-defined processes for creating render commands are implemented using <a href="../../../nw/gfx/UserRenderCommand/Invoke.html">Invoke</a> for classes that have inherited <a href="../../../nw/gfx/UserRenderCommand/Overview.html">UserRenderCommand</a>. Rendering by the CTR-SDK CR library is implemented here for UserRenderNodeDemo. 40 </p> 41 <p> 42 UserRenderNode is added to the scene graph and UserRenderCommand, implemented independently by the user, is set for this node. Because the addition of UserRenderCommand to <a href="../../../nw/gfx/RenderQueue.html">RenderQueue</a> is not handled automatically, you must add it to RenderQueue before rendering. See the <a href="../../../nw/demo/RenderSystem/SubmitView.html">SubmitView</a> implementation for details. Invoke of UserRenderCommand, added to the RenderQueue at tiem of render command creation, is called and user-defined render commands are created. 43 </p> 44 <p> 45 If a shader is switched, or other such processing is performed, inside a user-defined render process, you must appropriately reset the <a href="../../../nw/gfx/RenderContext/Overview.html">RenderContext</a> once the independent render process has ended. Reset is executed using <a href="../../../nw/gfx/RenderContext/ResetState.html">ResetState</a>. Since the shader is switched for rendering by GR in UserRenderNodeDemo, the shader program and material cache are reset at the end of Invoke. If reset is not carried out appropriately, subsequent rendering may not be performed normally because the shader has not been changed. 46 </p> 47 <p> 48 Rendering that accounts for UserRenderNode transforms is carried out by UserRenderNodeDemo. 49 </p> 50 <hr><p>CONFIDENTIAL</p></body> 51</html> 52