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 <style type="text/css"><!-- 8 span.static_style 9 { 10 font-size : 8pt; 11 color : white; 12 font-weight : bold; 13 background : #44f; 14 border-left : solid 1px #aaf; 15 border-top : solid 1px #aaf; 16 border-right : solid 1px #00c; 17 border-bottom : solid 1px #00c; 18 padding-left : 2px; 19 padding-right : 2px; 20 } 21 span.virtual_style 22 { 23 font-size : 8pt; 24 color : white; 25 font-weight : bold; 26 background : #0a0; 27 border-left : solid 1px #0f0; 28 border-top : solid 1px #0f0; 29 border-right : solid 1px #060; 30 border-bottom : solid 1px #060; 31 padding-left : 2px; 32 padding-right : 2px; 33 } 34 span.protected_style 35 { 36 font-size : 8pt; 37 color : white; 38 font-weight : bold; 39 background : #444; 40 border-left : solid 1px #ccc; 41 border-top : solid 1px #ccc; 42 border-right : solid 1px #222; 43 border-bottom : solid 1px #222; 44 padding-left : 2px; 45 padding-right : 2px; 46 } 47 --></style> 48 <title>nw::lyt::Drawer</title> 49 </head> 50 <body> 51 <h1><CODE><a href="../../../nw/Overview.html">nw</a>::<a href="../../../nw/lyt/Overview.html">lyt</a>::Drawer</CODE> Class</h1> 52 <h2>Syntax</h2> 53 <div class="section"> 54 <pre class="definition">class Drawer : public <a href="../../../nw/font/RectDrawer/Overview.html">nw::font::RectDrawer</a></pre> 55 </div> 56 <h2>Description</h2> 57 <div class="section"> 58 <p>High-speed drawing class.</p><p>This class draws layouts at high-speed.</p><p>Use this class in place of <a href="../../../nw/lyt/Layout/Draw.html">Layout::Draw()</a>.</p><p> nwlyt::Drawer drawer(graphicsResource);<br /> <br /> pLayout->Animate();<br /> pLayout->CalculateMtx(drawInfo);<br /> <br /> // GL setting made by the user.<br /> InitGX();<br /> <br /> drawer.DrawBegin(drawInfo);<br /> drawer.Draw(pLayout, drawInfo);<br /> drawer.DrawEnd(drawInfo);<br /> <br /> // Restores the coherency of the DMPGL state.<br /> nngxUpdateState(NN_GX_STATE_ALL);</p><p>The GL settings below are left up to the user (are not set by the lyt library).</p><p>・Culling<br /> ・Scissoring<br /> ・Stencil test<br /> ・Masking<br /> ・Polygon offset<br /> ・Depth test<br /> ・Early depth test<br /> ・Frame buffer object</p><p>For details on how to make these settings, check the simple demo source code. (The setting method is complicated because <a href="../../../nw/lyt/Drawer/Overview.html">Drawer</a> does not use standard GL functions.)</p><p>When the drawing function <a href="../../../nw/lyt/Drawer/Overview.html">Drawer</a> is executed, integrity of the DMPGL state is lost.</p><p>After using <CODE>Drawer</CODE>, be sure to call the <CODE>nngxUpdateState</CODE> function before using GL functions.</p></div> 59 <a name="variable" id="variable"> 60 <h2>Member Variables</h2> 61 <div class="section"> 62 <table class="members"> 63 <tr> 64 <td width="100"> 65 <span class="protected_style" title="protected">protected</span> </td> 66 <th> 67 <span class="argument">m_PrevTexObj</span> 68 </th> 69 <td width="100">GLuint</td> 70 <td> 71 </td> 72 </tr> </table> 73 </div> 74 </a> <a name="function" id="function"> 75 <h2>Member Functions</h2> 76 <div class="section"> 77 <table class="members"> 78 <tr> 79 <th class="category" colspan="3">Constructors and Destructors</th> 80 </tr> 81 <tr> 82 <td width="100"> </td> 83 <th> 84 <a href="../../../nw/lyt/Drawer/Drawer.html">Drawer</a> 85 </th> 86 <td>Constructor.</td> 87 </tr> 88 <tr> 89 <th class="category" colspan="3">Initialization / Post-processing</th> 90 </tr> 91 <tr> 92 <td width="100"> </td> 93 <th> 94 <a href="../../../nw/lyt/Drawer/Initialize.html"><CODE>Initialize</CODE></a> 95 </th> 96 <td>Performs initialization.</td> 97 </tr> 98 <tr> 99 <td width="100"> <span class="virtual_style" title="virtual">V</span> 100 </td> 101 <th> 102 <a href="../../../nw/lyt/Drawer/Finalize.html">Finalize</a> 103 </th> 104 <td>Releases, or finalizes.</td> 105 </tr> 106 <tr> 107 <th class="category" colspan="3">Rendering</th> 108 </tr> 109 <tr> 110 <td width="100"> </td> 111 <th> 112 <a href="../../../nw/lyt/Drawer/DrawBegin.html">DrawBegin</a> 113 </th> 114 <td>Starts drawing.</td> 115 </tr> 116 <tr> 117 <td width="100"> </td> 118 <th> 119 <a href="../../../nw/lyt/Drawer/Draw.html">Draw</a> 120 </th> 121 <td>Draws the layout.</td> 122 </tr> 123 <tr> 124 <td width="100"> </td> 125 <th> 126 <a href="../../../nw/lyt/Drawer/DrawEnd.html">DrawEnd</a> 127 </th> 128 <td>Ends drawing.</td> 129 </tr> 130 <tr> 131 <th class="category" colspan="3">Other</th> 132 </tr> 133 <tr> 134 <td width="100"> </td> 135 <th> 136 <a href="../../../nw/lyt/Drawer/FlushBuffer.html">FlushBuffer</a> 137 </th> 138 <td>Writes out the buffer contents.</td> 139 </tr> 140 <tr> 141 <td width="100"> </td> 142 <th> 143 <a href="../../../nw/font/RectDrawer/SetProjectionMtx.html">SetProjectionMtx</a> 144 </th> 145 <td>Sets the projection matrix.(Inherited from <a href="../../../nw/gfx/CameraProjectionUpdater/Overview.html"><CODE>RectDrawer</CODE></a>.</td> 146 </tr> 147 <tr> 148 <td width="100"> </td> 149 <th> 150 <a href="../../../nw/font/RectDrawer/SetViewMtxForText.html">SetViewMtxForText</a> 151 </th> 152 <td>Sets the view matrix for the text.(Inherited from <a href="../../../nw/gfx/CameraProjectionUpdater/Overview.html"><CODE>RectDrawer</CODE></a>.</td> 153 </tr> 154 <tr> 155 <td width="100"> </td> 156 <th> 157 <a href="../../../nw/font/RectDrawer/SetParallax.html">SetParallax</a> 158 </th> 159 <td>Sets the parallax parameters.(Inherited from <a href="../../../nw/gfx/CameraProjectionUpdater/Overview.html"><CODE>RectDrawer</CODE></a>.</td> 160 </tr> 161 <tr> 162 <td width="100"> </td> 163 <th> 164 <a href="../../../nw/font/RectDrawer/BuildTextCommand.html">BuildTextCommand</a> 165 </th> 166 <td>Creates drawing commands the text.(Inherited from <a href="../../../nw/gfx/CameraProjectionUpdater/Overview.html"><CODE>RectDrawer</CODE></a>.</td> 167 </tr> 168 <tr> 169 <td width="100"> 170 <span class="static_style" title="static">S</span> </td> 171 <th> 172 <a href="../../../nw/font/RectDrawer/GetVertexBufferCommandBufferSize.html">GetVertexBufferCommandBufferSize</a> 173 </th> 174 <td>Gets the size of the vertex buffer or command buffer required by RectDrawer.(Inherited from <a href="../../../nw/gfx/CameraProjectionUpdater/Overview.html"><CODE>RectDrawer</CODE></a>.</td> 175 </tr> 176 <tr> 177 <td width="100"> 178 <span class="static_style" title="static">S</span> </td> 179 <th> 180 <a href="../../../nw/font/RectDrawer/GetVertexBufferData.html">GetVertexBufferData</a> 181 </th> 182 <td>Gets data in the vertex buffer for use by RectDrawer.(Inherited from <a href="../../../nw/gfx/CameraProjectionUpdater/Overview.html"><CODE>RectDrawer</CODE></a>.</td> 183 </tr> 184 <tr> 185 <td width="100"> 186 <span class="static_style" title="static">S</span> </td> 187 <th> 188 <a href="../../../nw/font/RectDrawer/GetVertexBufferSize.html">GetVertexBufferSize</a> 189 </th> 190 <td>Gets the size of the vertex buffer required by RectDrawer.(Inherited from <a href="../../../nw/gfx/CameraProjectionUpdater/Overview.html"><CODE>RectDrawer</CODE></a>.</td> 191 </tr> 192 <tr> 193 <td width="100"> 194 <span class="static_style" title="static">S</span> </td> 195 <th> 196 <a href="../../../nw/font/RectDrawer/GetCommandBufferSize.html">GetCommandBufferSize</a> 197 </th> 198 <td>Gets the size of the stream buffer required by RectDrawer.(Inherited from <a href="../../../nw/gfx/CameraProjectionUpdater/Overview.html"><CODE>RectDrawer</CODE></a>.</td> 199 </tr> </table> 200 </div> 201 </a> 202 <h2>Class Hierarchy</h2> 203 <div class="section"> 204 <p class="hierarchy"><a href="../../../nw/font/RectDrawer/Overview.html">nw::font::RectDrawer</a><br /> <b>nw::lyt::Drawer</b> 205 </p> 206 </div> 207 <h2>Revision History</h2> 208 <div class="section"> 209 <dl class="history"> 210 <dt>2010/09/24</dt> 211 <dd>Eliminated the need to call nngxUpdateState() after Drawer initialization.<br /> 212 </dd> 213 <dt>2010/05/14</dt> 214 <dd>Initial version. Replaced the <CODE>DrawManager</CODE> function.<br /> 215 </dd> 216 </dl> 217 </div> 218 <hr><p>CONFIDENTIAL</p></body> 219</html> 220