diff options
Diffstat (limited to 'docs/doxygen/nel/a02874.html')
-rw-r--r-- | docs/doxygen/nel/a02874.html | 677 |
1 files changed, 677 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02874.html b/docs/doxygen/nel/a02874.html new file mode 100644 index 00000000..23bf05a8 --- /dev/null +++ b/docs/doxygen/nel/a02874.html @@ -0,0 +1,677 @@ +<!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::CMeshBlender 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 Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div> +<h1>NL3D::CMeshBlender Class Reference</h1><code>#include <<a class="el" href="a05996.html">mesh_blender.h</a>></code> +<p> +<hr><a name="_details"></a><h2>Detailed Description</h2> +A tool class used for Alpha Blending of Meshes. Actually, it takes a material, modify it and modify driver so it will be correctly rendered. The backup method must be used after render, to restore the material. <dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2002 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a05996.html#l00048">48</a> of file <a class="el" href="a05996.html">mesh_blender.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02874.html#NL3D_1_1CMeshBlendera0">CMeshBlender</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NL3D_1_1CMeshBlendera0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02874.html#NL3D_1_1CMeshBlendera1">prepareRenderForGlobalAlpha</a> (<a class="el" href="a02839.html">CMaterial</a> &material, <a class="el" href="a02434.html">IDriver</a> *drv, float globalAlpha, <a class="el" href="a04558.html#a7">uint8</a> globalAlphaInt, bool gaDisableZWrite)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Modify the material and the driver for Global Alpha Use. <a href="#NL3D_1_1CMeshBlendera1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02874.html#NL3D_1_1CMeshBlendera2">prepareRenderForGlobalAlphaCoarseMesh</a> (<a class="el" href="a02839.html">CMaterial</a> &material, <a class="el" href="a02434.html">IDriver</a> *drv, <a class="el" href="a03337.html">NLMISC::CRGBA</a> color, float globalAlpha, bool gaDisableZWrite)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Same method, but special for CoarseMesh (used by <a class="el" href="a02910.html#NL3D_1_1CMeshMultiLodd6">CMeshMultiLod::renderMeshGeom</a>). <a href="#NL3D_1_1CMeshBlendera2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02874.html#NL3D_1_1CMeshBlendera3">restoreRender</a> (<a class="el" href="a02839.html">CMaterial</a> &material, <a class="el" href="a02434.html">IDriver</a> *drv, bool gaDisableZWrite)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Restore the material and driver in their initial state. <a href="#NL3D_1_1CMeshBlendera3"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02874.html#NL3D_1_1CMeshBlendera4">restoreRenderCoarseMesh</a> (<a class="el" href="a02839.html">CMaterial</a> &material, <a class="el" href="a02434.html">IDriver</a> *drv, bool gaDisableZWrite)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Same method, but special for CoarseMesh (used by <a class="el" href="a02910.html#NL3D_1_1CMeshMultiLodd6">CMeshMultiLod::renderMeshGeom</a>). <a href="#NL3D_1_1CMeshBlendera4"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr0">_BkAlphaTestThreshold</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr1">_BkBlend</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02839.html#NL3D_1_1CMaterialw58">CMaterial::TBlend</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr2">_BkDstBlend</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr3">_BkOpacity</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02839.html#NL3D_1_1CMaterialw58">CMaterial::TBlend</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr4">_BkSrcBlend</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03337.html">NLMISC::CRGBA</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr5">_BkupColor</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr6">_BkZWrite</a></td></tr> + +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NL3D_1_1CMeshBlendera0" doxytag="NL3D::CMeshBlender::CMeshBlender" ></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"> NL3D::CMeshBlender::CMeshBlender </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Constructor. +<p> + +<p> +Definition at line <a class="el" href="a05996.html#l00053">53</a> of file <a class="el" href="a05996.html">mesh_blender.h</a>. +<p> +<div class="fragment"><pre>00053 {} +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NL3D_1_1CMeshBlendera1" doxytag="NL3D::CMeshBlender::prepareRenderForGlobalAlpha" ></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::CMeshBlender::prepareRenderForGlobalAlpha </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02839.html">CMaterial</a> & </td> + <td class="mdname" nowrap> <em>material</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> * </td> + <td class="mdname" nowrap> <em>drv</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>globalAlpha</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> </td> + <td class="mdname" nowrap> <em>globalAlphaInt</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>gaDisableZWrite</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Modify the material and the driver for Global Alpha Use. +<p> + +<p> +Definition at line <a class="el" href="a05995.html#l00037">37</a> of file <a class="el" href="a05995.html">mesh_blender.cpp</a>. +<p> +References <a class="el" href="a05996.html#l00073">_BkAlphaTestThreshold</a>, <a class="el" href="a05996.html#l00070">_BkBlend</a>, <a class="el" href="a05996.html#l00072">_BkDstBlend</a>, <a class="el" href="a05996.html#l00068">_BkOpacity</a>, <a class="el" href="a05996.html#l00071">_BkSrcBlend</a>, <a class="el" href="a05996.html#l00069">_BkZWrite</a>, <a class="el" href="a05969.html#l00314">NL3D::CMaterial::getAlphaTest()</a>, <a class="el" href="a05969.html#l00320">NL3D::CMaterial::getAlphaTestThreshold()</a>, <a class="el" href="a05969.html#l00278">NL3D::CMaterial::getBlend()</a>, <a class="el" href="a05969.html#l00280">NL3D::CMaterial::getDstBlend()</a>, <a class="el" href="a05969.html#l00381">NL3D::CMaterial::getOpacity()</a>, <a class="el" href="a05969.html#l00279">NL3D::CMaterial::getSrcBlend()</a>, <a class="el" href="a05969.html#l00335">NL3D::CMaterial::getZWrite()</a>, <a class="el" href="a05641.html#l00085">NL3D::CMaterial::setAlphaTestThreshold()</a>, <a class="el" href="a05641.html#l00064">NL3D::CMaterial::setBlend()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz153_4">NL3D::IDriver::setBlendConstantColor()</a>, <a class="el" href="a05641.html#l00058">NL3D::CMaterial::setDstBlend()</a>, <a class="el" href="a05641.html#l00173">NL3D::CMaterial::setOpacity()</a>, <a class="el" href="a05641.html#l00052">NL3D::CMaterial::setSrcBlend()</a>, <a class="el" href="a05641.html#l00105">NL3D::CMaterial::setZWrite()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz153_5">NL3D::IDriver::supportBlendConstantColor()</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +Referenced by <a class="el" href="a06011.html#l00568">NL3D::CMeshMRMSkinnedGeom::render()</a>, <a class="el" href="a06005.html#l00927">NL3D::CMeshMRMGeom::render()</a>, and <a class="el" href="a05989.html#l00598">NL3D::CMeshGeom::render()</a>. +<p> +<div class="fragment"><pre>00038 { +00039 <span class="comment">// Disable ZWrite??</span> +00040 <span class="keywordflow">if</span>(gaDisableZWrite) +00041 { +00042 <span class="comment">// Backup and set new the zwrite</span> +00043 <a class="code" href="a02874.html#NL3D_1_1CMeshBlenderr6">_BkZWrite</a>=material.getZWrite (); +00044 material.setZWrite (<span class="keyword">false</span>); +00045 } +00046 +00047 <span class="comment">// Backup blend</span> +00048 <a class="code" href="a02874.html#NL3D_1_1CMeshBlenderr1">_BkBlend</a>=material.getBlend (); +00049 material.setBlend (<span class="keyword">true</span>); +00050 +00051 <span class="comment">// Backup opacity and blend</span> +00052 <a class="code" href="a02874.html#NL3D_1_1CMeshBlenderr3">_BkOpacity</a>= material.getOpacity (); +00053 <a class="code" href="a02874.html#NL3D_1_1CMeshBlenderr4">_BkSrcBlend</a>= material.getSrcBlend(); +00054 <a class="code" href="a02874.html#NL3D_1_1CMeshBlenderr2">_BkDstBlend</a>= material.getDstBlend(); +00055 +00056 <span class="comment">// 2 ways: if Blend Constant Color is supported or not.</span> +00057 <span class="keywordflow">if</span>(drv->supportBlendConstantColor()) +00058 { +00059 <span class="comment">// Set opacity to 255 => If AlphaTest is used, AlphaTexture will be multiplied by 1.</span> +00060 material.setOpacity ( 255 ); +00061 +00062 <span class="comment">// set the Blend constant Alpha.</span> +00063 drv->setBlendConstantColor( <a class="code" href="a03337.html">CRGBA</a>(0,0,0, globalAlphaInt) ); +00064 +00065 <span class="comment">// Active Blend with Blend Constant Alpha .</span> +00066 material.setSrcBlend(CMaterial::blendConstantAlpha); +00067 +00068 <span class="comment">// Don't set dest if we are in additive blend mode</span> +00069 <span class="keywordflow">if</span> ((<a class="code" href="a02874.html#NL3D_1_1CMeshBlenderr1">_BkBlend</a> == <span class="keyword">false</span>) || (<a class="code" href="a02874.html#NL3D_1_1CMeshBlenderr2">_BkDstBlend</a> != CMaterial::one)) +00070 material.setDstBlend(CMaterial::blendConstantInvAlpha); +00071 +00072 <span class="comment">// if material is Alpha Test, no-op. Keep same threshold, since Use Alpha of the BlendConstantColor</span> +00073 <span class="comment">// to do the alpha-blending.</span> +00074 } +00075 <span class="comment">// not supported, ugly way: modify Opacity, and alpha threshold</span> +00076 <span class="keywordflow">else</span> +00077 { +00078 <span class="comment">// New opacity</span> +00079 material.setOpacity (globalAlphaInt); +00080 +00081 <span class="comment">// must ensure Std Blend.</span> +00082 material.setSrcBlend(CMaterial::srcalpha); +00083 +00084 <span class="comment">// Don't set dest if we are in additive blend mode</span> +00085 <span class="keywordflow">if</span> ((<a class="code" href="a02874.html#NL3D_1_1CMeshBlenderr1">_BkBlend</a> == <span class="keyword">false</span>) || (<a class="code" href="a02874.html#NL3D_1_1CMeshBlenderr2">_BkDstBlend</a> != CMaterial::one)) +00086 material.setDstBlend(CMaterial::invsrcalpha); +00087 +00088 <span class="comment">// if material is Alpha Test, must modulate AlphaTest limit to avoid Pop effects</span> +00089 <span class="keywordflow">if</span>(material.getAlphaTest()) +00090 { +00091 <a class="code" href="a02874.html#NL3D_1_1CMeshBlenderr0">_BkAlphaTestThreshold</a>= material.getAlphaTestThreshold(); +00092 material.setAlphaTestThreshold(_BkAlphaTestThreshold * globalAlpha); +00093 } +00094 } +00095 +00096 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CMeshBlendera2" doxytag="NL3D::CMeshBlender::prepareRenderForGlobalAlphaCoarseMesh" ></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::CMeshBlender::prepareRenderForGlobalAlphaCoarseMesh </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02839.html">CMaterial</a> & </td> + <td class="mdname" nowrap> <em>material</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> * </td> + <td class="mdname" nowrap> <em>drv</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03337.html">NLMISC::CRGBA</a> </td> + <td class="mdname" nowrap> <em>color</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>globalAlpha</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>gaDisableZWrite</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Same method, but special for CoarseMesh (used by <a class="el" href="a02910.html#NL3D_1_1CMeshMultiLodd6">CMeshMultiLod::renderMeshGeom</a>). +<p> + +<p> +Definition at line <a class="el" href="a05995.html#l00132">132</a> of file <a class="el" href="a05995.html">mesh_blender.cpp</a>. +<p> +References <a class="el" href="a05996.html#l00072">_BkDstBlend</a>, <a class="el" href="a05996.html#l00071">_BkSrcBlend</a>, <a class="el" href="a05996.html#l00074">_BkupColor</a>, <a class="el" href="a06340.html#l00340">NLMISC::CRGBA::A</a>, <a class="el" href="a05969.html#l00376">NL3D::CMaterial::getColor()</a>, <a class="el" href="a05969.html#l00280">NL3D::CMaterial::getDstBlend()</a>, <a class="el" href="a05969.html#l00279">NL3D::CMaterial::getSrcBlend()</a>, <a class="el" href="a05701.html#l00125">NLMISC::OptFastFloor()</a>, <a class="el" href="a05641.html#l00085">NL3D::CMaterial::setAlphaTestThreshold()</a>, <a class="el" href="a05641.html#l00064">NL3D::CMaterial::setBlend()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz153_4">NL3D::IDriver::setBlendConstantColor()</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="a05641.html#l00052">NL3D::CMaterial::setSrcBlend()</a>, <a class="el" href="a05641.html#l00105">NL3D::CMaterial::setZWrite()</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverz153_5">NL3D::IDriver::supportBlendConstantColor()</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +Referenced by <a class="el" href="a06016.html#l00446">NL3D::CMeshMultiLod::renderMeshGeom()</a>. +<p> +<div class="fragment"><pre>00133 { +00134 <span class="comment">// Don't need to bkup some values, because CoarseMesh.</span> +00135 +00136 <a class="code" href="a04558.html#a7">uint8</a> globalAlphaInt= (<a class="code" href="a04558.html#a7">uint8</a>)<a class="code" href="a05378.html#a397">NLMISC::OptFastFloor</a>(255 * globalAlpha); +00137 +00138 <span class="comment">// Disable ZWrite??</span> +00139 <span class="keywordflow">if</span>(gaDisableZWrite) +00140 material.setZWrite (<span class="keyword">false</span>); +00141 <span class="comment">// Enable blend</span> +00142 material.setBlend (<span class="keyword">true</span>); +00143 +00144 <span class="comment">// bkup color and blend factors.</span> +00145 <a class="code" href="a02874.html#NL3D_1_1CMeshBlenderr5">_BkupColor</a>= material.getColor(); +00146 <a class="code" href="a02874.html#NL3D_1_1CMeshBlenderr4">_BkSrcBlend</a>= material.getSrcBlend(); +00147 <a class="code" href="a02874.html#NL3D_1_1CMeshBlenderr2">_BkDstBlend</a>= material.getDstBlend(); +00148 +00149 <span class="comment">// 2 ways: if Blend Constant Color is supported or not.</span> +00150 <span class="keywordflow">if</span>(drv->supportBlendConstantColor()) +00151 { +00152 <span class="comment">// Set opacity to 255 => AlphaTexture will be multiplied by 1.</span> +00153 color.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= 255; +00154 <span class="comment">// change color</span> +00155 material.setColor ( color ); +00156 +00157 <span class="comment">// set the Blend constant Alpha.</span> +00158 drv->setBlendConstantColor( <a class="code" href="a03337.html">CRGBA</a>(0,0,0, globalAlphaInt) ); +00159 +00160 <span class="comment">// Active Blend with Blend Constant Alpha .</span> +00161 material.setSrcBlend(CMaterial::blendConstantAlpha); +00162 material.setDstBlend(CMaterial::blendConstantInvAlpha); +00163 } +00164 <span class="keywordflow">else</span> +00165 { +00166 <span class="comment">// Set current Alpha blend transparency (in color becausematerial is unlit)</span> +00167 color.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a>= globalAlphaInt; +00168 <span class="comment">// change color</span> +00169 material.setColor ( color ); +00170 +00171 <span class="comment">// Active Blend with Blend Constant Alpha .</span> +00172 material.setSrcBlend(CMaterial::srcalpha); +00173 material.setDstBlend(CMaterial::invsrcalpha); +00174 +00175 <span class="comment">// must modulate AlphaTest limit to avoid Pop effects</span> +00176 material.setAlphaTestThreshold(0.5f * globalAlpha); +00177 } +00178 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CMeshBlendera3" doxytag="NL3D::CMeshBlender::restoreRender" ></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::CMeshBlender::restoreRender </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02839.html">CMaterial</a> & </td> + <td class="mdname" nowrap> <em>material</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> * </td> + <td class="mdname" nowrap> <em>drv</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>gaDisableZWrite</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Restore the material and driver in their initial state. +<p> + +<p> +Definition at line <a class="el" href="a05995.html#l00099">99</a> of file <a class="el" href="a05995.html">mesh_blender.cpp</a>. +<p> +References <a class="el" href="a05996.html#l00073">_BkAlphaTestThreshold</a>, <a class="el" href="a05996.html#l00070">_BkBlend</a>, <a class="el" href="a05996.html#l00072">_BkDstBlend</a>, <a class="el" href="a05996.html#l00068">_BkOpacity</a>, <a class="el" href="a05996.html#l00071">_BkSrcBlend</a>, <a class="el" href="a05996.html#l00069">_BkZWrite</a>, <a class="el" href="a05969.html#l00314">NL3D::CMaterial::getAlphaTest()</a>, <a class="el" href="a05641.html#l00085">NL3D::CMaterial::setAlphaTestThreshold()</a>, <a class="el" href="a05641.html#l00064">NL3D::CMaterial::setBlend()</a>, <a class="el" href="a05641.html#l00058">NL3D::CMaterial::setDstBlend()</a>, <a class="el" href="a05641.html#l00173">NL3D::CMaterial::setOpacity()</a>, <a class="el" href="a05641.html#l00052">NL3D::CMaterial::setSrcBlend()</a>, <a class="el" href="a05641.html#l00105">NL3D::CMaterial::setZWrite()</a>, and <a class="el" href="a02434.html#NL3D_1_1IDriverz153_5">NL3D::IDriver::supportBlendConstantColor()</a>. +<p> +Referenced by <a class="el" href="a06011.html#l00568">NL3D::CMeshMRMSkinnedGeom::render()</a>, <a class="el" href="a06005.html#l00927">NL3D::CMeshMRMGeom::render()</a>, and <a class="el" href="a05989.html#l00598">NL3D::CMeshGeom::render()</a>. +<p> +<div class="fragment"><pre>00100 { +00101 <span class="comment">// Resetup backuped zwrite</span> +00102 <span class="keywordflow">if</span>(gaDisableZWrite) +00103 { +00104 material.setZWrite (_BkZWrite); +00105 } +00106 +00107 <span class="comment">// Resetup backuped blend</span> +00108 material.setBlend (_BkBlend); +00109 +00110 <span class="comment">// Resetup backuped opacity and blend factors</span> +00111 material.setOpacity (_BkOpacity); +00112 material.setSrcBlend(_BkSrcBlend); +00113 material.setDstBlend(_BkDstBlend); +00114 +00115 <span class="comment">// 2 ways: if Blend Constant Color is supported or not.</span> +00116 <span class="keywordflow">if</span>(drv->supportBlendConstantColor()) +00117 { +00118 <span class="comment">// nop</span> +00119 } +00120 <span class="keywordflow">else</span> +00121 { +00122 <span class="comment">// Resetup backuped AlphaTest threshold</span> +00123 <span class="keywordflow">if</span>(material.getAlphaTest()) +00124 { +00125 material.setAlphaTestThreshold(_BkAlphaTestThreshold); +00126 } +00127 } +00128 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CMeshBlendera4" doxytag="NL3D::CMeshBlender::restoreRenderCoarseMesh" ></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::CMeshBlender::restoreRenderCoarseMesh </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02839.html">CMaterial</a> & </td> + <td class="mdname" nowrap> <em>material</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> * </td> + <td class="mdname" nowrap> <em>drv</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>gaDisableZWrite</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Same method, but special for CoarseMesh (used by <a class="el" href="a02910.html#NL3D_1_1CMeshMultiLodd6">CMeshMultiLod::renderMeshGeom</a>). +<p> + +<p> +Definition at line <a class="el" href="a05995.html#l00181">181</a> of file <a class="el" href="a05995.html">mesh_blender.cpp</a>. +<p> +References <a class="el" href="a05996.html#l00072">_BkDstBlend</a>, <a class="el" href="a05996.html#l00071">_BkSrcBlend</a>, <a class="el" href="a05996.html#l00074">_BkupColor</a>, <a class="el" href="a05641.html#l00085">NL3D::CMaterial::setAlphaTestThreshold()</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="a05641.html#l00052">NL3D::CMaterial::setSrcBlend()</a>, <a class="el" href="a05641.html#l00105">NL3D::CMaterial::setZWrite()</a>, and <a class="el" href="a02434.html#NL3D_1_1IDriverz153_5">NL3D::IDriver::supportBlendConstantColor()</a>. +<p> +Referenced by <a class="el" href="a06016.html#l00446">NL3D::CMeshMultiLod::renderMeshGeom()</a>. +<p> +<div class="fragment"><pre>00182 { +00183 <span class="comment">// Resetup backuped color and blend factors</span> +00184 material.setColor ( _BkupColor ); +00185 material.setSrcBlend(_BkSrcBlend); +00186 material.setDstBlend(_BkDstBlend); +00187 +00188 <span class="comment">// ReEnable ZWrite??</span> +00189 <span class="keywordflow">if</span>(gaDisableZWrite) +00190 material.setZWrite (<span class="keyword">true</span>); +00191 <span class="comment">// Reset blend</span> +00192 material.setBlend (<span class="keyword">false</span>); +00193 +00194 <span class="comment">// 2 ways: if Blend Constant Color is supported or not.</span> +00195 <span class="keywordflow">if</span>(drv->supportBlendConstantColor()) +00196 { +00197 <span class="comment">// nop</span> +00198 } +00199 <span class="keywordflow">else</span> +00200 { +00201 <span class="comment">// reset AlphaTest limit</span> +00202 material.setAlphaTestThreshold(0.5f); +00203 } +00204 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NL3D_1_1CMeshBlenderr0" doxytag="NL3D::CMeshBlender::_BkAlphaTestThreshold" ></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"> float <a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr0">NL3D::CMeshBlender::_BkAlphaTestThreshold</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05996.html#l00073">73</a> of file <a class="el" href="a05996.html">mesh_blender.h</a>. +<p> +Referenced by <a class="el" href="a05995.html#l00037">prepareRenderForGlobalAlpha()</a>, and <a class="el" href="a05995.html#l00099">restoreRender()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CMeshBlenderr1" doxytag="NL3D::CMeshBlender::_BkBlend" ></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"> bool <a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr1">NL3D::CMeshBlender::_BkBlend</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05996.html#l00070">70</a> of file <a class="el" href="a05996.html">mesh_blender.h</a>. +<p> +Referenced by <a class="el" href="a05995.html#l00037">prepareRenderForGlobalAlpha()</a>, and <a class="el" href="a05995.html#l00099">restoreRender()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CMeshBlenderr2" doxytag="NL3D::CMeshBlender::_BkDstBlend" ></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="a02839.html#NL3D_1_1CMaterialw58">CMaterial::TBlend</a> <a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr2">NL3D::CMeshBlender::_BkDstBlend</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05996.html#l00072">72</a> of file <a class="el" href="a05996.html">mesh_blender.h</a>. +<p> +Referenced by <a class="el" href="a05995.html#l00037">prepareRenderForGlobalAlpha()</a>, <a class="el" href="a05995.html#l00132">prepareRenderForGlobalAlphaCoarseMesh()</a>, <a class="el" href="a05995.html#l00099">restoreRender()</a>, and <a class="el" href="a05995.html#l00181">restoreRenderCoarseMesh()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CMeshBlenderr3" doxytag="NL3D::CMeshBlender::_BkOpacity" ></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="a04558.html#a7">uint8</a> <a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr3">NL3D::CMeshBlender::_BkOpacity</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05996.html#l00068">68</a> of file <a class="el" href="a05996.html">mesh_blender.h</a>. +<p> +Referenced by <a class="el" href="a05995.html#l00037">prepareRenderForGlobalAlpha()</a>, and <a class="el" href="a05995.html#l00099">restoreRender()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CMeshBlenderr4" doxytag="NL3D::CMeshBlender::_BkSrcBlend" ></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="a02839.html#NL3D_1_1CMaterialw58">CMaterial::TBlend</a> <a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr4">NL3D::CMeshBlender::_BkSrcBlend</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05996.html#l00071">71</a> of file <a class="el" href="a05996.html">mesh_blender.h</a>. +<p> +Referenced by <a class="el" href="a05995.html#l00037">prepareRenderForGlobalAlpha()</a>, <a class="el" href="a05995.html#l00132">prepareRenderForGlobalAlphaCoarseMesh()</a>, <a class="el" href="a05995.html#l00099">restoreRender()</a>, and <a class="el" href="a05995.html#l00181">restoreRenderCoarseMesh()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CMeshBlenderr5" doxytag="NL3D::CMeshBlender::_BkupColor" ></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="a03337.html">NLMISC::CRGBA</a> <a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr5">NL3D::CMeshBlender::_BkupColor</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05996.html#l00074">74</a> of file <a class="el" href="a05996.html">mesh_blender.h</a>. +<p> +Referenced by <a class="el" href="a05995.html#l00132">prepareRenderForGlobalAlphaCoarseMesh()</a>, and <a class="el" href="a05995.html#l00181">restoreRenderCoarseMesh()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CMeshBlenderr6" doxytag="NL3D::CMeshBlender::_BkZWrite" ></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"> bool <a class="el" href="a02874.html#NL3D_1_1CMeshBlenderr6">NL3D::CMeshBlender::_BkZWrite</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05996.html#l00069">69</a> of file <a class="el" href="a05996.html">mesh_blender.h</a>. +<p> +Referenced by <a class="el" href="a05995.html#l00037">prepareRenderForGlobalAlpha()</a>, and <a class="el" href="a05995.html#l00099">restoreRender()</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a05996.html">mesh_blender.h</a><li><a class="el" href="a05995.html">mesh_blender.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:51:46 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> |