aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02440.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doxygen/nel/a02440.html')
-rw-r--r--docs/doxygen/nel/a02440.html1466
1 files changed, 1466 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02440.html b/docs/doxygen/nel/a02440.html
new file mode 100644
index 00000000..a0d20a08
--- /dev/null
+++ b/docs/doxygen/nel/a02440.html
@@ -0,0 +1,1466 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>NeL: NL3D::CDRU class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.6 -->
+<div class="qindex"> <form class="search" action="search.php" method="get">
+<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
+<h1>NL3D::CDRU Class Reference</h1><code>#include &lt;<a class="el" href="a05661.html">dru.h</a>&gt;</code>
+<p>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+The driver Utilities class of static.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05661.html#l00106">106</a> of file <a class="el" href="a05661.html">dru.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUe0">createGlDriver</a> () throw (EDru)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Portable Function which create a GL Driver (using gl dll...). <a href="#NL3D_1_1CDRUe0"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">2D render.</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz189_0">drawBitmap</a> (float <a class="el" href="a04223.html#a572">x</a>, float <a class="el" href="a04223.html#a573">y</a>, float <a class="el" href="a04223.html#a632">width</a>, float <a class="el" href="a04223.html#a633">height</a>, class <a class="el" href="a03487.html">ITexture</a> &amp;texture, <a class="el" href="a02434.html">IDriver</a> &amp;driver, <a class="el" href="a03704.html">CViewport</a> viewport=<a class="el" href="a03704.html">CViewport</a>(), bool blend=true)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw a bitmap 2D. Warning: this is slow... <a href="#NL3D_1_1CDRUz189_0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz189_1">drawLine</a> (float x0, float y0, float x1, float y1, <a class="el" href="a02434.html">IDriver</a> &amp;driver, <a class="el" href="a03337.html">CRGBA</a> col=<a class="el" href="a03337.html">CRGBA</a>(255, 255, 255, 255), <a class="el" href="a03704.html">CViewport</a> viewport=<a class="el" href="a03704.html">CViewport</a>())</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw a line in 2D. Warning: this is slow... <a href="#NL3D_1_1CDRUz189_1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz189_2">drawQuad</a> (float xcenter, float ycenter, float radius, <a class="el" href="a02434.html">IDriver</a> &amp;driver, <a class="el" href="a03337.html">CRGBA</a> col, <a class="el" href="a03704.html">CViewport</a> viewport)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw a Quad in 2D. Warning: this is slow... <a href="#NL3D_1_1CDRUz189_2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz189_3">drawQuad</a> (float x0, float y0, float x1, float y1, <a class="el" href="a03337.html">CRGBA</a> col0, <a class="el" href="a03337.html">CRGBA</a> col1, <a class="el" href="a03337.html">CRGBA</a> col2, <a class="el" href="a03337.html">CRGBA</a> col3, <a class="el" href="a02434.html">IDriver</a> &amp;driver, <a class="el" href="a03704.html">CViewport</a> viewport)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz189_4">drawQuad</a> (float x0, float y0, float x1, float y1, <a class="el" href="a02434.html">IDriver</a> &amp;driver, <a class="el" href="a03337.html">CRGBA</a> col, <a class="el" href="a03704.html">CViewport</a> viewport)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw a Quad in 2D. Warning: this is slow... <a href="#NL3D_1_1CDRUz189_4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz189_5">drawTriangle</a> (float x0, float y0, float x1, float y1, float x2, float y2, <a class="el" href="a02434.html">IDriver</a> &amp;driver, <a class="el" href="a03337.html">CRGBA</a> col, <a class="el" href="a03704.html">CViewport</a> viewport)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw a Triangle in 2D. Warning: this is slow... <a href="#NL3D_1_1CDRUz189_5"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz189_6">drawWiredQuad</a> (float xcenter, float ycenter, float radius, <a class="el" href="a02434.html">IDriver</a> &amp;driver, <a class="el" href="a03337.html">CRGBA</a> col, <a class="el" href="a03704.html">CViewport</a> viewport)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw a Quad in 2D. Warning: this is slow... <a href="#NL3D_1_1CDRUz189_6"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz189_7">drawWiredQuad</a> (float x0, float y0, float x1, float y1, <a class="el" href="a02434.html">IDriver</a> &amp;driver, <a class="el" href="a03337.html">CRGBA</a> col, <a class="el" href="a03704.html">CViewport</a> viewport)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw a Quad in 2D. Warning: this is slow... <a href="#NL3D_1_1CDRUz189_7"></a><br><br></td></tr>
+<tr><td colspan="2"><div class="groupHeader">Easy render (2D or 3D).</div></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz191_0">drawLine</a> (const <a class="el" href="a03128.html">CVector</a> &amp;a, const <a class="el" href="a03128.html">CVector</a> &amp;b, <a class="el" href="a03337.html">CRGBA</a> color, <a class="el" href="a02434.html">IDriver</a> &amp;driver)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw one line in 3D only, with a specific color. <a href="#NL3D_1_1CDRUz191_0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz191_1">drawLinesUnlit</a> (const std::vector&lt; <a class="el" href="a02759.html">NLMISC::CLine</a> &gt; &amp;linelist, <a class="el" href="a02839.html">CMaterial</a> &amp;mat, <a class="el" href="a02434.html">IDriver</a> &amp;driver)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw the Lines, with Vertex only. "mat" should not be a lighted material since no normal is computed. <a href="#NL3D_1_1CDRUz191_1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz191_2">drawLinesUnlit</a> (const <a class="el" href="a02759.html">NLMISC::CLine</a> *linelist, <a class="el" href="a04558.html#a14">sint</a> nlines, <a class="el" href="a02839.html">CMaterial</a> &amp;mat, <a class="el" href="a02434.html">IDriver</a> &amp;driver)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw the Lines, with Vertex only. "mat" should not be a lighted material since no normal is computed. <a href="#NL3D_1_1CDRUz191_2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz191_3">drawTrianglesUnlit</a> (const std::vector&lt; <a class="el" href="a03621.html">NLMISC::CTriangleUV</a> &gt; &amp;trilist, <a class="el" href="a02839.html">CMaterial</a> &amp;mat, <a class="el" href="a02434.html">IDriver</a> &amp;driver)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw the triangles, with Vertex and 1 UV. "mat" should not be a lighted material since no normal is computed. <a href="#NL3D_1_1CDRUz191_3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz191_4">drawTrianglesUnlit</a> (const <a class="el" href="a03621.html">NLMISC::CTriangleUV</a> *trilist, <a class="el" href="a04558.html#a14">sint</a> ntris, <a class="el" href="a02839.html">CMaterial</a> &amp;mat, <a class="el" href="a02434.html">IDriver</a> &amp;driver)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw the triangles, with Vertex and 1 UV. "mat" should not be a lighted material since no normal is computed. <a href="#NL3D_1_1CDRUz191_4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02440.html#NL3D_1_1CDRUz191_5">drawWiredBox</a> (const <a class="el" href="a03128.html">CVector</a> &amp;corner, const <a class="el" href="a03128.html">CVector</a> &amp;vi, const <a class="el" href="a03128.html">CVector</a> &amp;vj, const <a class="el" href="a03128.html">CVector</a> &amp;vk, <a class="el" href="a03337.html">CRGBA</a> color, <a class="el" href="a02434.html">IDriver</a> &amp;driver)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw a wired box in 3D, with a specific color. <a href="#NL3D_1_1CDRUz191_5"></a><br><br></td></tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NL3D_1_1CDRUe0" doxytag="NL3D::CDRU::createGlDriver" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a02434.html">IDriver</a> * NL3D::CDRU::createGlDriver </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> throw (<a class="el" href="a03782.html">EDru</a>)<code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Portable Function which create a GL Driver (using gl dll...).
+<p>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00059">59</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a05660.html#l00051">NL3D::IDRV_CREATE_PROC</a>, <a class="el" href="a05660.html#l00052">NL3D::IDRV_CREATE_PROC_NAME</a>, <a class="el" href="a05660.html#l00054">NL3D::IDRV_VERSION_PROC</a>, <a class="el" href="a05660.html#l00055">NL3D::IDRV_VERSION_PROC_NAME</a>, <a class="el" href="a05622.html#l00111">nlinfo</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>.
+<p>
+<div class="fragment"><pre>00060 {
+00061 <a class="code" href="a05363.html#a21">IDRV_CREATE_PROC</a> createDriver = NULL;
+00062 <a class="code" href="a05363.html#a23">IDRV_VERSION_PROC</a> versionDriver = NULL;
+00063
+00064 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span>
+00065 <span class="preprocessor"></span>
+00066 <span class="comment">// WINDOWS code.</span>
+00067 HINSTANCE hInst;
+00068
+00069 hInst=LoadLibrary(NL3D_DLL_NAME);
+00070
+00071 <span class="keywordflow">if</span> (!hInst)
+00072 {
+00073 <span class="keywordflow">throw</span> EDruOpenglDriverNotFound();
+00074 }
+00075
+00076 <span class="keywordtype">char</span> <a class="code" href="a04223.html#a589">buffer</a>[1024], *ptr;
+00077 SearchPath (NULL, NL3D_DLL_NAME, NULL, 1023, buffer, &amp;ptr);
+00078 <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"Using the library '"</span>NL3D_DLL_NAME<span class="stringliteral">"' that is in the directory: '%s'"</span>, buffer);
+00079
+00080 createDriver = (<a class="code" href="a05363.html#a21">IDRV_CREATE_PROC</a>) GetProcAddress (hInst, IDRV_CREATE_PROC_NAME);
+00081 <span class="keywordflow">if</span> (createDriver == NULL)
+00082 {
+00083 <span class="keywordflow">throw</span> EDruOpenglDriverCorrupted();
+00084 }
+00085
+00086 versionDriver = (<a class="code" href="a05363.html#a23">IDRV_VERSION_PROC</a>) GetProcAddress (hInst, IDRV_VERSION_PROC_NAME);
+00087 <span class="keywordflow">if</span> (versionDriver != NULL)
+00088 {
+00089 <span class="keywordflow">if</span> (versionDriver()&lt;IDriver::InterfaceVersion)
+00090 <span class="keywordflow">throw</span> EDruOpenglDriverOldVersion();
+00091 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (versionDriver()&gt;IDriver::InterfaceVersion)
+00092 <span class="keywordflow">throw</span> EDruOpenglDriverUnknownVersion();
+00093 }
+00094
+00095 <span class="preprocessor">#elif defined (NL_OS_UNIX)</span>
+00096 <span class="preprocessor"></span>
+00097 <span class="keywordtype">void</span> *handle = dlopen(NL3D_DLL_NAME, RTLD_NOW);
+00098
+00099 <span class="keywordflow">if</span> (handle == NULL)
+00100 {
+00101 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"when loading dynamic library '%s': %s"</span>, NL3D_DLL_NAME, dlerror());
+00102 <span class="keywordflow">throw</span> EDruOpenglDriverNotFound();
+00103 }
+00104
+00105 <span class="comment">/* Not ANSI. Might produce a warning */</span>
+00106 createDriver = (<a class="code" href="a05363.html#a21">IDRV_CREATE_PROC</a>) dlsym (handle, IDRV_CREATE_PROC_NAME);
+00107 <span class="keywordflow">if</span> (createDriver == NULL)
+00108 {
+00109 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"when getting function in dynamic library '%s': %s"</span>, NL3D_DLL_NAME, dlerror());
+00110 <span class="keywordflow">throw</span> EDruOpenglDriverCorrupted();
+00111 }
+00112
+00113 versionDriver = (<a class="code" href="a05363.html#a23">IDRV_VERSION_PROC</a>) dlsym (handle, IDRV_VERSION_PROC_NAME);
+00114 <span class="keywordflow">if</span> (versionDriver != NULL)
+00115 {
+00116 <span class="keywordflow">if</span> (versionDriver()&lt;IDriver::InterfaceVersion)
+00117 <span class="keywordflow">throw</span> EDruOpenglDriverOldVersion();
+00118 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (versionDriver()&gt;IDriver::InterfaceVersion)
+00119 <span class="keywordflow">throw</span> EDruOpenglDriverUnknownVersion();
+00120 }
+00121
+00122 <span class="preprocessor">#else // NL_OS_UNIX</span>
+00123 <span class="preprocessor"></span><span class="preprocessor">#error "Dynamic DLL loading not implemented!"</span>
+00124 <span class="preprocessor"></span><span class="preprocessor">#endif // NL_OS_UNIX</span>
+00125 <span class="preprocessor"></span>
+00126 IDriver *ret= createDriver();
+00127 <span class="keywordflow">if</span> (ret == NULL)
+00128 {
+00129 <span class="keywordflow">throw</span> EDruOpenglDriverCantCreateDriver();
+00130 }
+00131 <span class="keywordflow">return</span> ret;
+00132 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz189_0" doxytag="NL3D::CDRU::drawBitmap" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawBitmap </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>x</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>y</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>width</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>height</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>class <a class="el" href="a03487.html">ITexture</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>texture</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03704.html">CViewport</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>viewport</em> = <a class="el" href="a03704.html">CViewport</a>(), </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>blend</em> = true</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw a bitmap 2D. Warning: this is slow...
+<p>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00136">136</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+References <a class="el" href="a02434.html#NL3D_1_1IDrivera2">NL3D::IDriver::activeVertexBuffer()</a>, <a class="el" href="a05646.html#l01013">height</a>, <a class="el" href="a05972.html#l00200">NLMISC::CMatrix::identity()</a>, <a class="el" href="a05968.html#l00059">NL3D::CMaterial::initUnlit()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera51">NL3D::IDriver::render()</a>, <a class="el" href="a05641.html#l00064">NL3D::CMaterial::setBlend()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera60">NL3D::IDriver::setFrustum()</a>, <a class="el" href="a06197.html#l00180">NL3D::CPrimitiveBlock::setNumQuad()</a>, <a class="el" href="a06710.html#l00409">NL3D::CVertexBuffer::setNumVertices()</a>, <a class="el" href="a06197.html#l00193">NL3D::CPrimitiveBlock::setQuad()</a>, <a class="el" href="a06711.html#l00600">NL3D::CVertexBuffer::setTexCoord()</a>, <a class="el" href="a05968.html#l00322">NL3D::CMaterial::setTexture()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera68">NL3D::IDriver::setupModelMatrix()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera72">NL3D::IDriver::setupViewMatrix()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera74">NL3D::IDriver::setupViewport()</a>, <a class="el" href="a06711.html#l00524">NL3D::CVertexBuffer::setVertexCoord()</a>, <a class="el" href="a06710.html#l00169">NL3D::CVertexBuffer::setVertexFormat()</a>, <a class="el" href="a05641.html#l00099">NL3D::CMaterial::setZFunc()</a>, <a class="el" href="a05646.html#l01013">width</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
+<p>
+<div class="fragment"><pre>00137 {
+00138 CMatrix mtx;
+00139 mtx.identity();
+00140 driver.setupViewport (viewport);
+00141 driver.setupViewMatrix (mtx);
+00142 driver.setupModelMatrix (mtx);
+00143 driver.setFrustum (0.f, 1.f, 0.f, 1.f, -1.f, 1.f, <span class="keyword">false</span>);
+00144
+00145 <span class="keyword">static</span> CMaterial mat;
+00146 mat.initUnlit ();
+00147 mat.setTexture (0, &amp;texture);
+00148 mat.setBlend(blend);
+00149 mat.setZFunc(CMaterial::always);
+00150
+00151 <span class="keyword">static</span> CVertexBuffer vb;
+00152 vb.setVertexFormat (CVertexBuffer::PositionFlag|CVertexBuffer::TexCoord0Flag);
+00153 vb.setNumVertices (4);
+00154 vb.setVertexCoord (0, CVector (x, 0, y));
+00155 vb.setVertexCoord (1, CVector (x+width, 0, y));
+00156 vb.setVertexCoord (2, CVector (x+width, 0, y+height));
+00157 vb.setVertexCoord (3, CVector (x, 0, y+height));
+00158 vb.setTexCoord (0, 0, 0.f, 1.f);
+00159 vb.setTexCoord (1, 0, 1.f, 1.f);
+00160 vb.setTexCoord (2, 0, 1.f, 0.f);
+00161 vb.setTexCoord (3, 0, 0.f, 0.f);
+00162 driver.activeVertexBuffer(vb);
+00163
+00164 CPrimitiveBlock pb;
+00165 pb.setNumQuad (1);
+00166 pb.setQuad (0, 0, 1, 2, 3);
+00167
+00168 driver.render(pb, mat);
+00169 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz191_0" doxytag="NL3D::CDRU::drawLine" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawLine </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>a</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>b</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>color</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw one line in 3D only, with a specific color.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00404">404</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+References <a class="el" href="a05968.html#l00059">NL3D::CMaterial::initUnlit()</a>, and <a class="el" href="a05641.html#l00118">NL3D::CMaterial::setColor()</a>.
+<p>
+<div class="fragment"><pre>00405 {
+00406 <span class="keyword">static</span> <a class="code" href="a02759.html">NLMISC::CLine</a> <a class="code" href="a05377.html#a3">line</a>;
+00407 <span class="keyword">static</span> CMaterial mat;
+00408 <span class="keyword">static</span> <span class="keywordtype">bool</span> inited= <span class="keyword">false</span>;
+00409
+00410 <span class="comment">// Setup material.</span>
+00411 <span class="keywordflow">if</span>(!inited)
+00412 {
+00413 inited= <span class="keyword">true</span>;
+00414 mat.initUnlit();
+00415 }
+00416 mat.setColor(color);
+00417
+00418
+00419 <a class="code" href="a05377.html#a3">line</a>.V0= a;
+00420 <a class="code" href="a05377.html#a3">line</a>.V1= b;
+00421 CDRU::drawLinesUnlit(&amp;line, 1, mat, driver);
+00422 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz189_1" doxytag="NL3D::CDRU::drawLine" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawLine </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>x0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>y0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>x1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>y1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>col</em> = <a class="el" href="a03337.html">CRGBA</a>(255, 255, 255, 255), </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03704.html">CViewport</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>viewport</em> = <a class="el" href="a03704.html">CViewport</a>()</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw a line in 2D. Warning: this is slow...
+<p>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00173">173</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+References <a class="el" href="a02434.html#NL3D_1_1IDrivera2">NL3D::IDriver::activeVertexBuffer()</a>, <a class="el" href="a05972.html#l00200">NLMISC::CMatrix::identity()</a>, <a class="el" href="a05968.html#l00059">NL3D::CMaterial::initUnlit()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera51">NL3D::IDriver::render()</a>, <a class="el" href="a05641.html#l00064">NL3D::CMaterial::setBlend()</a>, <a class="el" href="a05641.html#l00118">NL3D::CMaterial::setColor()</a>, <a class="el" href="a05641.html#l00058">NL3D::CMaterial::setDstBlend()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera60">NL3D::IDriver::setFrustum()</a>, <a class="el" href="a06197.html#l00069">NL3D::CPrimitiveBlock::setLine()</a>, <a class="el" href="a06197.html#l00061">NL3D::CPrimitiveBlock::setNumLine()</a>, <a class="el" href="a06710.html#l00409">NL3D::CVertexBuffer::setNumVertices()</a>, <a class="el" href="a05641.html#l00052">NL3D::CMaterial::setSrcBlend()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera68">NL3D::IDriver::setupModelMatrix()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera72">NL3D::IDriver::setupViewMatrix()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera74">NL3D::IDriver::setupViewport()</a>, <a class="el" href="a06711.html#l00524">NL3D::CVertexBuffer::setVertexCoord()</a>, <a class="el" href="a06710.html#l00169">NL3D::CVertexBuffer::setVertexFormat()</a>, and <a class="el" href="a05641.html#l00099">NL3D::CMaterial::setZFunc()</a>.
+<p>
+Referenced by <a class="el" href="a05660.html#l00462">drawWiredBox()</a>.
+<p>
+<div class="fragment"><pre>00174 {
+00175 CMatrix mtx;
+00176 mtx.identity();
+00177 driver.setupViewport (viewport);
+00178 driver.setupViewMatrix (mtx);
+00179 driver.setupModelMatrix (mtx);
+00180 driver.setFrustum (0.f, 1.f, 0.f, 1.f, -1.f, 1.f, <span class="keyword">false</span>);
+00181
+00182 <span class="keyword">static</span> CMaterial mat;
+00183 mat.initUnlit ();
+00184 mat.setSrcBlend(CMaterial::srcalpha);
+00185 mat.setDstBlend(CMaterial::invsrcalpha);
+00186 mat.setBlend(<span class="keyword">true</span>);
+00187 mat.setColor(col);
+00188 mat.setZFunc (CMaterial::always);
+00189
+00190 <span class="keyword">static</span> CVertexBuffer vb;
+00191 vb.setVertexFormat (CVertexBuffer::PositionFlag);
+00192 vb.setNumVertices (2);
+00193 vb.setVertexCoord (0, CVector (x0, 0, y0));
+00194 vb.setVertexCoord (1, CVector (x1, 0, y1));
+00195 driver.activeVertexBuffer(vb);
+00196
+00197 CPrimitiveBlock pb;
+00198 pb.setNumLine (1);
+00199 pb.setLine (0, 0, 1);
+00200
+00201 driver.render(pb, mat);
+00202 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz191_1" doxytag="NL3D::CDRU::drawLinesUnlit" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawLinesUnlit </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::vector&lt; <a class="el" href="a02759.html">NLMISC::CLine</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>linelist</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02839.html">CMaterial</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>mat</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw the Lines, with Vertex only. "mat" should not be a lighted material since no normal is computed.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00397">397</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+<div class="fragment"><pre>00398 {
+00399 <span class="keywordflow">if</span>(linelist.size()==0)
+00400 <span class="keywordflow">return</span>;
+00401 CDRU::drawLinesUnlit( &amp;(*linelist.begin()), linelist.size(), mat, driver);
+00402 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz191_2" doxytag="NL3D::CDRU::drawLinesUnlit" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawLinesUnlit </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02759.html">NLMISC::CLine</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>linelist</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>nlines</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02839.html">CMaterial</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>mat</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw the Lines, with Vertex only. "mat" should not be a lighted material since no normal is computed.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00377">377</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+References <a class="el" href="a02434.html#NL3D_1_1IDrivera2">NL3D::IDriver::activeVertexBuffer()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera51">NL3D::IDriver::render()</a>, <a class="el" href="a06197.html#l00069">NL3D::CPrimitiveBlock::setLine()</a>, <a class="el" href="a06197.html#l00061">NL3D::CPrimitiveBlock::setNumLine()</a>, <a class="el" href="a06710.html#l00409">NL3D::CVertexBuffer::setNumVertices()</a>, <a class="el" href="a06711.html#l00524">NL3D::CVertexBuffer::setVertexCoord()</a>, <a class="el" href="a06710.html#l00169">NL3D::CVertexBuffer::setVertexFormat()</a>, and <a class="el" href="a05981.html#l00104">sint</a>.
+<p>
+<div class="fragment"><pre>00378 {
+00379 <span class="keyword">static</span> CVertexBuffer vb;
+00380 vb.setVertexFormat (CVertexBuffer::PositionFlag);
+00381 vb.setNumVertices (nlines*2);
+00382
+00383 <span class="keyword">static</span> CPrimitiveBlock pb;
+00384 pb.setNumLine(nlines);
+00385
+00386 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;nlines;i++)
+00387 {
+00388 vb.setVertexCoord (i*2+0, linelist[i].V0);
+00389 vb.setVertexCoord (i*2+1, linelist[i].V1);
+00390 pb.setLine(i, i*2+0, i*2+1);
+00391 }
+00392
+00393 driver.activeVertexBuffer(vb);
+00394 driver.render(pb, mat);
+00395 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz189_2" doxytag="NL3D::CDRU::drawQuad" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawQuad </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>xcenter</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>ycenter</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>radius</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>col</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03704.html">CViewport</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>viewport</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw a Quad in 2D. Warning: this is slow...
+<p>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00277">277</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+References <a class="el" href="a02434.html#NL3D_1_1IDrivera2">NL3D::IDriver::activeVertexBuffer()</a>, <a class="el" href="a05972.html#l00200">NLMISC::CMatrix::identity()</a>, <a class="el" href="a05968.html#l00059">NL3D::CMaterial::initUnlit()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera51">NL3D::IDriver::render()</a>, <a class="el" href="a05641.html#l00064">NL3D::CMaterial::setBlend()</a>, <a class="el" href="a05641.html#l00118">NL3D::CMaterial::setColor()</a>, <a class="el" href="a05641.html#l00058">NL3D::CMaterial::setDstBlend()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera60">NL3D::IDriver::setFrustum()</a>, <a class="el" href="a06197.html#l00180">NL3D::CPrimitiveBlock::setNumQuad()</a>, <a class="el" href="a06710.html#l00409">NL3D::CVertexBuffer::setNumVertices()</a>, <a class="el" href="a06197.html#l00193">NL3D::CPrimitiveBlock::setQuad()</a>, <a class="el" href="a05641.html#l00052">NL3D::CMaterial::setSrcBlend()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera68">NL3D::IDriver::setupModelMatrix()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera72">NL3D::IDriver::setupViewMatrix()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera74">NL3D::IDriver::setupViewport()</a>, <a class="el" href="a06711.html#l00524">NL3D::CVertexBuffer::setVertexCoord()</a>, <a class="el" href="a06710.html#l00169">NL3D::CVertexBuffer::setVertexFormat()</a>, and <a class="el" href="a05641.html#l00099">NL3D::CMaterial::setZFunc()</a>.
+<p>
+<div class="fragment"><pre>00278 {
+00279 CMatrix mtx;
+00280 mtx.identity();
+00281 driver.setupViewport (viewport);
+00282 driver.setupViewMatrix (mtx);
+00283 driver.setupModelMatrix (mtx);
+00284 driver.setFrustum (0.f, 1.f, 0.f, 1.f, -1.f, 1.f, <span class="keyword">false</span>);
+00285
+00286 <span class="keyword">static</span> CMaterial mat;
+00287 mat.initUnlit();
+00288 mat.setSrcBlend(CMaterial::srcalpha);
+00289 mat.setDstBlend(CMaterial::invsrcalpha);
+00290 mat.setBlend(<span class="keyword">true</span>);
+00291 mat.setColor(col);
+00292 mat.setZFunc (CMaterial::always);
+00293
+00294 <span class="keyword">static</span> CVertexBuffer vb;
+00295 vb.setVertexFormat (CVertexBuffer::PositionFlag);
+00296 vb.setNumVertices (4);
+00297 vb.setVertexCoord (0, CVector (xcenter-radius, 0, ycenter-radius));
+00298 vb.setVertexCoord (1, CVector (xcenter+radius, 0, ycenter-radius));
+00299 vb.setVertexCoord (2, CVector (xcenter+radius, 0, ycenter+radius));
+00300 vb.setVertexCoord (3, CVector (xcenter-radius, 0, ycenter+radius));
+00301
+00302 driver.activeVertexBuffer(vb);
+00303
+00304 CPrimitiveBlock pb;
+00305 pb.setNumQuad (1);
+00306 pb.setQuad (0, 0, 1, 2, 3);
+00307
+00308 driver.render(pb, mat);
+00309 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz189_3" doxytag="NL3D::CDRU::drawQuad" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawQuad </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>x0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>y0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>x1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>y1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>col0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>col1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>col2</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>col3</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03704.html">CViewport</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>viewport</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw a color Quad in 2D. Warning: this is slow...<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>x0</em>&nbsp;</td><td>is the x coordinate of the lower left corner. </td></tr>
+ <tr><td valign=top><em>y0</em>&nbsp;</td><td>is the y coordinate of the lower left corner. </td></tr>
+ <tr><td valign=top><em>x1</em>&nbsp;</td><td>is the x coordinate of the upper right corner. </td></tr>
+ <tr><td valign=top><em>y1</em>&nbsp;</td><td>is the y coordinate of the upper right corner. </td></tr>
+ <tr><td valign=top><em>col0</em>&nbsp;</td><td>is the color of the lower left corner. </td></tr>
+ <tr><td valign=top><em>col0</em>&nbsp;</td><td>is the color of the lower right corner. </td></tr>
+ <tr><td valign=top><em>col0</em>&nbsp;</td><td>is the color of the upper right corner. </td></tr>
+ <tr><td valign=top><em>col0</em>&nbsp;</td><td>is the color of the upper left corner. </td></tr>
+ <tr><td valign=top><em>driver</em>&nbsp;</td><td>is the driver to use to render the quad. </td></tr>
+ <tr><td valign=top><em>viewport</em>&nbsp;</td><td>is the viewport to use to render the quad.</td></tr>
+ </table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00424">424</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+References <a class="el" href="a02434.html#NL3D_1_1IDrivera2">NL3D::IDriver::activeVertexBuffer()</a>, <a class="el" href="a05972.html#l00200">NLMISC::CMatrix::identity()</a>, <a class="el" href="a05968.html#l00059">NL3D::CMaterial::initUnlit()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera51">NL3D::IDriver::render()</a>, <a class="el" href="a05641.html#l00064">NL3D::CMaterial::setBlend()</a>, <a class="el" href="a06711.html#l00568">NL3D::CVertexBuffer::setColor()</a>, <a class="el" href="a05641.html#l00058">NL3D::CMaterial::setDstBlend()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera60">NL3D::IDriver::setFrustum()</a>, <a class="el" href="a06197.html#l00180">NL3D::CPrimitiveBlock::setNumQuad()</a>, <a class="el" href="a06710.html#l00409">NL3D::CVertexBuffer::setNumVertices()</a>, <a class="el" href="a06197.html#l00193">NL3D::CPrimitiveBlock::setQuad()</a>, <a class="el" href="a05641.html#l00052">NL3D::CMaterial::setSrcBlend()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera68">NL3D::IDriver::setupModelMatrix()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera72">NL3D::IDriver::setupViewMatrix()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera74">NL3D::IDriver::setupViewport()</a>, <a class="el" href="a06711.html#l00524">NL3D::CVertexBuffer::setVertexCoord()</a>, <a class="el" href="a06710.html#l00169">NL3D::CVertexBuffer::setVertexFormat()</a>, and <a class="el" href="a05641.html#l00099">NL3D::CMaterial::setZFunc()</a>.
+<p>
+<div class="fragment"><pre>00425 {
+00426 CMatrix mtx;
+00427 mtx.identity();
+00428 driver.setupViewport (viewport);
+00429 driver.setupViewMatrix (mtx);
+00430 driver.setupModelMatrix (mtx);
+00431 driver.setFrustum (0.f, 1.f, 0.f, 1.f, -1.f, 1.f, <span class="keyword">false</span>);
+00432
+00433 <span class="keyword">static</span> CMaterial mat;
+00434 mat.initUnlit();
+00435 mat.setSrcBlend(CMaterial::srcalpha);
+00436 mat.setDstBlend(CMaterial::invsrcalpha);
+00437 mat.setBlend(<span class="keyword">true</span>);
+00438 mat.setZFunc (CMaterial::always);
+00439
+00440 <span class="keyword">static</span> CVertexBuffer vb;
+00441 vb.setVertexFormat (CVertexBuffer::PositionFlag|CVertexBuffer::PrimaryColorFlag);
+00442 vb.setNumVertices (4);
+00443 vb.setVertexCoord (0, CVector (x0, 0, y0));
+00444 vb.setColor (0, col0);
+00445 vb.setVertexCoord (1, CVector (x1, 0, y0));
+00446 vb.setColor (1, col1);
+00447 vb.setVertexCoord (2, CVector (x1, 0, y1));
+00448 vb.setColor (2, col2);
+00449 vb.setVertexCoord (3, CVector (x0, 0, y1));
+00450 vb.setColor (3, col3);
+00451
+00452 driver.activeVertexBuffer(vb);
+00453
+00454 CPrimitiveBlock pb;
+00455 pb.setNumQuad (1);
+00456 pb.setQuad (0, 0, 1, 2, 3);
+00457
+00458 driver.render(pb, mat);
+00459 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz189_4" doxytag="NL3D::CDRU::drawQuad" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawQuad </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>x0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>y0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>x1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>y1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>col</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03704.html">CViewport</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>viewport</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw a Quad in 2D. Warning: this is slow...
+<p>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00241">241</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+References <a class="el" href="a02434.html#NL3D_1_1IDrivera2">NL3D::IDriver::activeVertexBuffer()</a>, <a class="el" href="a05972.html#l00200">NLMISC::CMatrix::identity()</a>, <a class="el" href="a05968.html#l00059">NL3D::CMaterial::initUnlit()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera51">NL3D::IDriver::render()</a>, <a class="el" href="a05641.html#l00064">NL3D::CMaterial::setBlend()</a>, <a class="el" href="a05641.html#l00118">NL3D::CMaterial::setColor()</a>, <a class="el" href="a05641.html#l00058">NL3D::CMaterial::setDstBlend()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera60">NL3D::IDriver::setFrustum()</a>, <a class="el" href="a06197.html#l00180">NL3D::CPrimitiveBlock::setNumQuad()</a>, <a class="el" href="a06710.html#l00409">NL3D::CVertexBuffer::setNumVertices()</a>, <a class="el" href="a06197.html#l00193">NL3D::CPrimitiveBlock::setQuad()</a>, <a class="el" href="a05641.html#l00052">NL3D::CMaterial::setSrcBlend()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera68">NL3D::IDriver::setupModelMatrix()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera72">NL3D::IDriver::setupViewMatrix()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera74">NL3D::IDriver::setupViewport()</a>, <a class="el" href="a06711.html#l00524">NL3D::CVertexBuffer::setVertexCoord()</a>, <a class="el" href="a06710.html#l00169">NL3D::CVertexBuffer::setVertexFormat()</a>, and <a class="el" href="a05641.html#l00099">NL3D::CMaterial::setZFunc()</a>.
+<p>
+<div class="fragment"><pre>00242 {
+00243 CMatrix mtx;
+00244 mtx.identity();
+00245 driver.setupViewport (viewport);
+00246 driver.setupViewMatrix (mtx);
+00247 driver.setupModelMatrix (mtx);
+00248 driver.setFrustum (0.f, 1.f, 0.f, 1.f, -1.f, 1.f, <span class="keyword">false</span>);
+00249
+00250 <span class="keyword">static</span> CMaterial mat;
+00251 mat.initUnlit();
+00252 mat.setSrcBlend(CMaterial::srcalpha);
+00253 mat.setDstBlend(CMaterial::invsrcalpha);
+00254 mat.setBlend(<span class="keyword">true</span>);
+00255 mat.setColor(col);
+00256 mat.setZFunc (CMaterial::always);
+00257
+00258 <span class="keyword">static</span> CVertexBuffer vb;
+00259 vb.setVertexFormat (CVertexBuffer::PositionFlag);
+00260 vb.setNumVertices (4);
+00261 vb.setVertexCoord (0, CVector (x0, 0, y0));
+00262 vb.setVertexCoord (1, CVector (x1, 0, y0));
+00263 vb.setVertexCoord (2, CVector (x1, 0, y1));
+00264 vb.setVertexCoord (3, CVector (x0, 0, y1));
+00265
+00266 driver.activeVertexBuffer(vb);
+00267
+00268 CPrimitiveBlock pb;
+00269 pb.setNumQuad (1);
+00270 pb.setQuad (0, 0, 1, 2, 3);
+00271
+00272 driver.render(pb, mat);
+00273 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz189_5" doxytag="NL3D::CDRU::drawTriangle" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawTriangle </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>x0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>y0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>x1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>y1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>x2</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>y2</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>col</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03704.html">CViewport</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>viewport</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw a Triangle in 2D. Warning: this is slow...
+<p>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00206">206</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+References <a class="el" href="a02434.html#NL3D_1_1IDrivera2">NL3D::IDriver::activeVertexBuffer()</a>, <a class="el" href="a05972.html#l00200">NLMISC::CMatrix::identity()</a>, <a class="el" href="a05968.html#l00059">NL3D::CMaterial::initUnlit()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera51">NL3D::IDriver::render()</a>, <a class="el" href="a05641.html#l00064">NL3D::CMaterial::setBlend()</a>, <a class="el" href="a05641.html#l00118">NL3D::CMaterial::setColor()</a>, <a class="el" href="a05641.html#l00058">NL3D::CMaterial::setDstBlend()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera60">NL3D::IDriver::setFrustum()</a>, <a class="el" href="a06197.html#l00114">NL3D::CPrimitiveBlock::setNumTri()</a>, <a class="el" href="a06710.html#l00409">NL3D::CVertexBuffer::setNumVertices()</a>, <a class="el" href="a05641.html#l00052">NL3D::CMaterial::setSrcBlend()</a>, <a class="el" href="a06197.html#l00122">NL3D::CPrimitiveBlock::setTri()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera68">NL3D::IDriver::setupModelMatrix()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera72">NL3D::IDriver::setupViewMatrix()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera74">NL3D::IDriver::setupViewport()</a>, <a class="el" href="a06711.html#l00524">NL3D::CVertexBuffer::setVertexCoord()</a>, <a class="el" href="a06710.html#l00169">NL3D::CVertexBuffer::setVertexFormat()</a>, and <a class="el" href="a05641.html#l00099">NL3D::CMaterial::setZFunc()</a>.
+<p>
+<div class="fragment"><pre>00207 {
+00208 CMatrix mtx;
+00209 mtx.identity();
+00210 driver.setupViewport (viewport);
+00211 driver.setupViewMatrix (mtx);
+00212 driver.setupModelMatrix (mtx);
+00213 driver.setFrustum (0.f, 1.f, 0.f, 1.f, -1.f, 1.f, <span class="keyword">false</span>);
+00214
+00215 <span class="keyword">static</span> CMaterial mat;
+00216 mat.initUnlit();
+00217 mat.setSrcBlend(CMaterial::srcalpha);
+00218 mat.setDstBlend(CMaterial::invsrcalpha);
+00219 mat.setBlend(<span class="keyword">true</span>);
+00220 mat.setColor(col);
+00221 mat.setZFunc (CMaterial::always);
+00222
+00223 <span class="keyword">static</span> CVertexBuffer vb;
+00224 vb.setVertexFormat (CVertexBuffer::PositionFlag);
+00225 vb.setNumVertices (3);
+00226 vb.setVertexCoord (0, CVector (x0, 0, y0));
+00227 vb.setVertexCoord (1, CVector (x1, 0, y1));
+00228 vb.setVertexCoord (2, CVector (x2, 0, y2));
+00229 driver.activeVertexBuffer(vb);
+00230
+00231 CPrimitiveBlock pb;
+00232 pb.setNumTri (1);
+00233 pb.setTri (0, 0, 1, 2);
+00234
+00235 driver.render(pb, mat);
+00236 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz191_3" doxytag="NL3D::CDRU::drawTrianglesUnlit" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawTrianglesUnlit </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::vector&lt; <a class="el" href="a03621.html">NLMISC::CTriangleUV</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>trilist</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02839.html">CMaterial</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>mat</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw the triangles, with Vertex and 1 UV. "mat" should not be a lighted material since no normal is computed.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00367">367</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+<div class="fragment"><pre>00368 {
+00369 <span class="keywordflow">if</span>(trilist.size()==0)
+00370 <span class="keywordflow">return</span>;
+00371
+00372 CDRU::drawTrianglesUnlit( &amp;(*trilist.begin()), trilist.size(), mat, driver);
+00373 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz191_4" doxytag="NL3D::CDRU::drawTrianglesUnlit" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawTrianglesUnlit </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03621.html">NLMISC::CTriangleUV</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>trilist</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ntris</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02839.html">CMaterial</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>mat</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw the triangles, with Vertex and 1 UV. "mat" should not be a lighted material since no normal is computed.
+<p>
+Those render methods work in the current driver viewport/frustum/matrixes. Since no vertex sharing is performed, their use may be slower than direct use of VBuffer/PBlock etc... Also, A VBuffer and a PBlock is created, and copies are made from the list of primitives to the driver...
+<p>
+Definition at line <a class="el" href="a05660.html#l00341">341</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+References <a class="el" href="a02434.html#NL3D_1_1IDrivera2">NL3D::IDriver::activeVertexBuffer()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera51">NL3D::IDriver::render()</a>, <a class="el" href="a06197.html#l00114">NL3D::CPrimitiveBlock::setNumTri()</a>, <a class="el" href="a06710.html#l00409">NL3D::CVertexBuffer::setNumVertices()</a>, <a class="el" href="a06711.html#l00600">NL3D::CVertexBuffer::setTexCoord()</a>, <a class="el" href="a06197.html#l00122">NL3D::CPrimitiveBlock::setTri()</a>, <a class="el" href="a06711.html#l00524">NL3D::CVertexBuffer::setVertexCoord()</a>, <a class="el" href="a06710.html#l00169">NL3D::CVertexBuffer::setVertexFormat()</a>, and <a class="el" href="a05981.html#l00104">sint</a>.
+<p>
+<div class="fragment"><pre>00342 {
+00343 <span class="keyword">static</span> CVertexBuffer vb;
+00344 vb.setVertexFormat (CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag);
+00345 vb.setNumVertices (ntris*3);
+00346
+00347 <span class="keyword">static</span> CPrimitiveBlock pb;
+00348 pb.setNumTri(ntris);
+00349
+00350 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i&lt;ntris;i++)
+00351 {
+00352 vb.setVertexCoord (i*3+0, trilist[i].V0);
+00353 vb.setVertexCoord (i*3+1, trilist[i].V1);
+00354 vb.setVertexCoord (i*3+2, trilist[i].V2);
+00355 vb.setTexCoord (i*3+0, 0, trilist[i].Uv0);
+00356 vb.setTexCoord (i*3+1, 0, trilist[i].Uv1);
+00357 vb.setTexCoord (i*3+2, 0, trilist[i].Uv2);
+00358 pb.setTri(i, i*3+0, i*3+1, i*3+2);
+00359 }
+00360
+00361 driver.activeVertexBuffer(vb);
+00362 driver.render(pb, mat);
+00363 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz191_5" doxytag="NL3D::CDRU::drawWiredBox" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawWiredBox </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>corner</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vi</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vj</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vk</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>color</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw a wired box in 3D, with a specific color.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00462">462</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+References <a class="el" href="a05660.html#l00173">drawLine()</a>.
+<p>
+<div class="fragment"><pre>00463 {
+00464 CVector p0= corner;
+00465 CVector p1= p0 + vi + vj + vk;
+00466 <a class="code" href="a02440.html#NL3D_1_1CDRUz189_1">drawLine</a>(p0, p0+vi, color, drv);
+00467 <a class="code" href="a02440.html#NL3D_1_1CDRUz189_1">drawLine</a>(p0, p0+vj, color, drv);
+00468 <a class="code" href="a02440.html#NL3D_1_1CDRUz189_1">drawLine</a>(p0, p0+vk, color, drv);
+00469 <a class="code" href="a02440.html#NL3D_1_1CDRUz189_1">drawLine</a>(p1, p1-vi, color, drv);
+00470 <a class="code" href="a02440.html#NL3D_1_1CDRUz189_1">drawLine</a>(p1, p1-vj, color, drv);
+00471 <a class="code" href="a02440.html#NL3D_1_1CDRUz189_1">drawLine</a>(p1, p1-vk, color, drv);
+00472 <a class="code" href="a02440.html#NL3D_1_1CDRUz189_1">drawLine</a>(p0+vi, p0+vi+vj, color, drv);
+00473 <a class="code" href="a02440.html#NL3D_1_1CDRUz189_1">drawLine</a>(p0+vi, p0+vi+vk, color, drv);
+00474 <a class="code" href="a02440.html#NL3D_1_1CDRUz189_1">drawLine</a>(p0+vj, p0+vj+vi, color, drv);
+00475 <a class="code" href="a02440.html#NL3D_1_1CDRUz189_1">drawLine</a>(p0+vj, p0+vj+vk, color, drv);
+00476 <a class="code" href="a02440.html#NL3D_1_1CDRUz189_1">drawLine</a>(p0+vk, p0+vk+vi, color, drv);
+00477 <a class="code" href="a02440.html#NL3D_1_1CDRUz189_1">drawLine</a>(p0+vk, p0+vk+vj, color, drv);
+00478 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz189_6" doxytag="NL3D::CDRU::drawWiredQuad" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawWiredQuad </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>xcenter</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>ycenter</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>radius</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>col</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03704.html">CViewport</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>viewport</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw a Quad in 2D. Warning: this is slow...
+<p>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00327">327</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+<div class="fragment"><pre>00328 {
+00329 <span class="comment">// v-left</span>
+00330 CDRU::drawLine(xcenter-radius,ycenter-radius,xcenter-radius,ycenter+radius,driver,col,viewport);
+00331 <span class="comment">// v-right</span>
+00332 CDRU::drawLine(xcenter+radius,ycenter-radius,xcenter+radius,ycenter+radius,driver,col,viewport);
+00333 <span class="comment">// h-up</span>
+00334 CDRU::drawLine(xcenter-radius,ycenter+radius,xcenter+radius,ycenter+radius,driver,col,viewport);
+00335 <span class="comment">// h-bottom</span>
+00336 CDRU::drawLine(xcenter-radius,ycenter-radius,xcenter+radius,ycenter-radius,driver,col,viewport);
+00337 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NL3D_1_1CDRUz189_7" doxytag="NL3D::CDRU::drawWiredQuad" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NL3D::CDRU::drawWiredQuad </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">float&nbsp;</td>
+ <td class="mdname" nowrap> <em>x0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>y0</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>x1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>y1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>driver</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03337.html">CRGBA</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>col</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a03704.html">CViewport</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>viewport</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Draw a Quad in 2D. Warning: this is slow...
+<p>
+
+<p>
+Definition at line <a class="el" href="a05660.html#l00313">313</a> of file <a class="el" href="a05660.html">dru.cpp</a>.
+<p>
+<div class="fragment"><pre>00314 {
+00315 <span class="comment">// v-left</span>
+00316 CDRU::drawLine(x0,y0,x0,y1 ,driver,col,viewport);
+00317 <span class="comment">// v-right</span>
+00318 CDRU::drawLine(x1,y0,x1,y1 ,driver,col,viewport);
+00319 <span class="comment">// h-up</span>
+00320 CDRU::drawLine(x0,y1,x1,y1,driver,col,viewport);
+00321 <span class="comment">// h-bottom</span>
+00322 CDRU::drawLine(x0,y0,x1,y0,driver,col,viewport);
+00323 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a05661.html">dru.h</a><li><a class="el" href="a05660.html">dru.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:46:23 2004 for NeL by
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
+</a>1.3.6 </small></address>
+</body>
+</html>