Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-release > by-pkgid > 58828b263d8f56d90ac336dea07a4586 > files > 699

irrlicht-doc-1.6.1-1mdv2010.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Irrlicht Engine: irr::video::IMaterialRenderer Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table class="irrlicht" >
  <tr valign="middle"> 
    <td><font size="2"><a class="qindex" href="index.html"><font color="#FFFFFF">Home</font></a> 
      | <a class="qindex" href="namespaces.html"><font color="#FFFFFF">Namespaces</font></a> 
      | <a class="qindex" href="hierarchy.html"><font color="#FFFFFF">Hierarchy</font></a> 
      | <a class="qindex" href="classes.html"><font color="#FFFFFF">Alphabetical 
      List</font></a> | <a class="qindex" href="annotated.html"><font color="#FFFFFF"> 
      Class list</font></a> | <a class="qindex" href="files.html"><font color="#FFFFFF">Files</font></a> 
      | <a class="qindex" href="namespacemembers.html"><font color="#FFFFFF"> 
      Namespace&nbsp;Members</font></a> | <a class="qindex" href="functions.html"><font color="#FFFFFF">Class 
      members</font></a> | <a class="qindex" href="globals.html"><font color="#FFFFFF">File 
      members</font></a> | <a class="qindex" href="pages.html"><font color="#FFFFFF">Tutorials</font></a></font> </td>
  </tr>
</table>
<!-- Generated by Doxygen 1.5.6 -->
  <div class="navpath"><a class="el" href="namespaceirr.html">irr</a>::<a class="el" href="namespaceirr_1_1video.html">video</a>::<a class="el" href="classirr_1_1video_1_1_i_material_renderer.html">IMaterialRenderer</a>
  </div>
<div class="contents">
<h1>irr::video::IMaterialRenderer Class Reference</h1><!-- doxytag: class="irr::video::IMaterialRenderer" --><!-- doxytag: inherits="irr::IReferenceCounted" -->Interface for material rendering.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="_i_material_renderer_8h-source.html">IMaterialRenderer.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for irr::video::IMaterialRenderer:</div>
<div class="dynsection">

<p><center><img src="classirr_1_1video_1_1_i_material_renderer.png" usemap="#irr::video::IMaterialRenderer_map" border="0" alt=""></center>
<map name="irr::video::IMaterialRenderer_map">
<area href="classirr_1_1_i_reference_counted.html" alt="irr::IReferenceCounted" shape="rect" coords="0,0,170,24">
</map>
</div>

<p>
<a href="classirr_1_1video_1_1_i_material_renderer-members.html">List of all members.</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">virtual <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1video_1_1_i_material_renderer.html#8ccaf22f84f26a718559d3c97f7cb550">getRenderCapability</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the render capability of the material.  <a href="#8ccaf22f84f26a718559d3c97f7cb550"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1video_1_1_i_material_renderer.html#31ba4c2c50b85327d328cb9e7b1764bd">isTransparent</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns if the material is transparent.  <a href="#31ba4c2c50b85327d328cb9e7b1764bd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1video_1_1_i_material_renderer.html#8cb6c5f93856de7586a318f14ed21a22">OnRender</a> (<a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html">IMaterialRendererServices</a> *service, <a class="el" href="namespaceirr_1_1video.html#0e3b59e025e0d0db0ed2ee0ce904deac">E_VERTEX_TYPE</a> vtxtype)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called every time before a new bunch of geometry is being drawn using this material with for example drawIndexedTriangleList() call.  <a href="#8cb6c5f93856de7586a318f14ed21a22"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1video_1_1_i_material_renderer.html#eaffc03c1b9feb40cd01469726b287e3">OnSetMaterial</a> (const <a class="el" href="classirr_1_1video_1_1_s_material.html">SMaterial</a> &amp;material, const <a class="el" href="classirr_1_1video_1_1_s_material.html">SMaterial</a> &amp;lastMaterial, bool resetAllRenderstates, <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html">IMaterialRendererServices</a> *services)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called by the <a class="el" href="classirr_1_1video_1_1_i_video_driver.html" title="Interface to driver which is able to perform 2d and 3d graphics functions.">IVideoDriver</a> implementation the let the renderer set its needed render states.  <a href="#eaffc03c1b9feb40cd01469726b287e3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1video_1_1_i_material_renderer.html#694b1285671853cb151c03100fd01c73">OnUnsetMaterial</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called by the <a class="el" href="classirr_1_1video_1_1_i_video_driver.html" title="Interface to driver which is able to perform 2d and 3d graphics functions.">IVideoDriver</a> to unset this material.  <a href="#694b1285671853cb151c03100fd01c73"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Interface for material rendering. 
<p>
Can be used to extend the engine with new materials. Refer to <a class="el" href="classirr_1_1video_1_1_i_video_driver.html#0dfc3a7168f3a73a6f4323b579f03ff6" title="Adds a new material renderer to the video device.">IVideoDriver::addMaterialRenderer()</a> for more informations on how to extend the engine with new materials. 
<p>Definition at line <a class="el" href="_i_material_renderer_8h-source.html#l00024">24</a> of file <a class="el" href="_i_material_renderer_8h-source.html">IMaterialRenderer.h</a>.</p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="8ccaf22f84f26a718559d3c97f7cb550"></a><!-- doxytag: member="irr::video::IMaterialRenderer::getRenderCapability" ref="8ccaf22f84f26a718559d3c97f7cb550" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> irr::video::IMaterialRenderer::getRenderCapability           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the render capability of the material. 
<p>
Because some more complex materials are implemented in multiple ways and need special hardware capabilities, it is possible to query how the current material renderer is performing on the current hardware with this function. <dl class="return" compact><dt><b>Returns:</b></dt><dd>Returns 0 if everything is running fine. Any other value is material renderer specific and means for example that the renderer switched back to a fall back material because it cannot use the latest shaders. More specific examples: Fixed function pipeline materials should return 0 in most cases, parallax mapped material will only return 0 when at least pixel shader 1.4 is available on that machine. </dd></dl>

<p>Definition at line <a class="el" href="_i_material_renderer_8h-source.html#l00093">93</a> of file <a class="el" href="_i_material_renderer_8h-source.html">IMaterialRenderer.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="31ba4c2c50b85327d328cb9e7b1764bd"></a><!-- doxytag: member="irr::video::IMaterialRenderer::isTransparent" ref="31ba4c2c50b85327d328cb9e7b1764bd" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool irr::video::IMaterialRenderer::isTransparent           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns if the material is transparent. 
<p>
The <a class="el" href="namespaceirr_1_1scene.html" title="All scene management can be found in this namespace: Mesh loading, special scene...">scene</a> managment needs to know this for being able to sort the materials by opaque and transparent. 
<p>Definition at line <a class="el" href="_i_material_renderer_8h-source.html#l00081">81</a> of file <a class="el" href="_i_material_renderer_8h-source.html">IMaterialRenderer.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="8cb6c5f93856de7586a318f14ed21a22"></a><!-- doxytag: member="irr::video::IMaterialRenderer::OnRender" ref="8cb6c5f93856de7586a318f14ed21a22" args="(IMaterialRendererServices *service, E_VERTEX_TYPE vtxtype)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool irr::video::IMaterialRenderer::OnRender           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html">IMaterialRendererServices</a> *&nbsp;</td>
          <td class="paramname"> <em>service</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr_1_1video.html#0e3b59e025e0d0db0ed2ee0ce904deac">E_VERTEX_TYPE</a>&nbsp;</td>
          <td class="paramname"> <em>vtxtype</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Called every time before a new bunch of geometry is being drawn using this material with for example drawIndexedTriangleList() call. 
<p>
OnSetMaterial should normally only be called if the renderer decides that the renderstates should be changed, it won't be called if for example two drawIndexedTriangleList() will be called with the same material set. This method will be called every time. This is useful for example for materials with shaders, which don't only set new renderstates but also shader constants. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>service,:</em>&nbsp;</td><td>Pointer to interface providing methos for setting constants and other things. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>vtxtype,:</em>&nbsp;</td><td>Vertex type with which the next rendering will be done. This can be used by the material renderer to set some specific optimized shaders or if this is an incompatible vertex type for this renderer, to refuse rendering for example. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Returns true if everything is ok, and false if nothing should be rendered. The material renderer can choose to return false for example if he doesn't support the specified vertex type. This is actually done in D3D8 and D3D9 when using a normal mapped material with a vertex type other than EVT_TANGENTS. </dd></dl>

<p>Definition at line <a class="el" href="_i_material_renderer_8h-source.html#l00071">71</a> of file <a class="el" href="_i_material_renderer_8h-source.html">IMaterialRenderer.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="eaffc03c1b9feb40cd01469726b287e3"></a><!-- doxytag: member="irr::video::IMaterialRenderer::OnSetMaterial" ref="eaffc03c1b9feb40cd01469726b287e3" args="(const SMaterial &amp;material, const SMaterial &amp;lastMaterial, bool resetAllRenderstates, IMaterialRendererServices *services)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void irr::video::IMaterialRenderer::OnSetMaterial           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classirr_1_1video_1_1_s_material.html">SMaterial</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>material</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classirr_1_1video_1_1_s_material.html">SMaterial</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>lastMaterial</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>resetAllRenderstates</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html">IMaterialRendererServices</a> *&nbsp;</td>
          <td class="paramname"> <em>services</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Called by the <a class="el" href="classirr_1_1video_1_1_i_video_driver.html" title="Interface to driver which is able to perform 2d and 3d graphics functions.">IVideoDriver</a> implementation the let the renderer set its needed render states. 
<p>
This is called during the <a class="el" href="classirr_1_1video_1_1_i_video_driver.html#8c9e31b41b7e6fd26cf65ce538ebab05" title="Sets a material.">IVideoDriver::setMaterial()</a> call. When overriding this, you can set some renderstates or for example a vertex or pixel shader if you like. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>material,:</em>&nbsp;</td><td>The new material parameters to be set. The renderer may change the material flags in this material. For example if this material does not accept the zbuffer = true, it can set it to false. This is useful, because in the next lastMaterial will be just the material in this call. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>lastMaterial,:</em>&nbsp;</td><td>The material parameters which have been set before this material. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>resetAllRenderstates,:</em>&nbsp;</td><td>True if all renderstates should really be reset. This is usually true if the last rendering mode was not a usual 3d rendering mode, but for example a 2d rendering mode. You should reset really all renderstates if this is true, no matter if the lastMaterial had some similar settings. This is used because in most cases, some common renderstates are not changed if they are already there, for example bilinear filtering, wireframe, gouraudshading, lighting, zbuffer, zwriteenable, backfaceculling and fogenable. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>services,:</em>&nbsp;</td><td>Interface providing some methods for changing advanced, internal states of a <a class="el" href="classirr_1_1video_1_1_i_video_driver.html" title="Interface to driver which is able to perform 2d and 3d graphics functions.">IVideoDriver</a>. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="_i_material_renderer_8h-source.html#l00050">50</a> of file <a class="el" href="_i_material_renderer_8h-source.html">IMaterialRenderer.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="694b1285671853cb151c03100fd01c73"></a><!-- doxytag: member="irr::video::IMaterialRenderer::OnUnsetMaterial" ref="694b1285671853cb151c03100fd01c73" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void irr::video::IMaterialRenderer::OnUnsetMaterial           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Called by the <a class="el" href="classirr_1_1video_1_1_i_video_driver.html" title="Interface to driver which is able to perform 2d and 3d graphics functions.">IVideoDriver</a> to unset this material. 
<p>
Called during the <a class="el" href="classirr_1_1video_1_1_i_video_driver.html#8c9e31b41b7e6fd26cf65ce538ebab05" title="Sets a material.">IVideoDriver::setMaterial()</a> call before the new material will get the <a class="el" href="classirr_1_1video_1_1_i_material_renderer.html#eaffc03c1b9feb40cd01469726b287e3" title="Called by the IVideoDriver implementation the let the renderer set its needed render...">OnSetMaterial()</a> call. 
<p>Definition at line <a class="el" href="_i_material_renderer_8h-source.html#l00076">76</a> of file <a class="el" href="_i_material_renderer_8h-source.html">IMaterialRenderer.h</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_i_material_renderer_8h-source.html">IMaterialRenderer.h</a></ul>
</div>
<hr size="1">
<address style="align: right;">
<small> </small>
</address>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
  <tr> 
    <td width="0"> <div align="left"><small><a href="http://irrlicht.sourceforge.net" target="_blank"><img src="irrlicht.png" alt="The Irrlicht Engine" align="middle" border=0 width=88 height=31></a></small></div></td>
    <td> <div align="left"><small><em><font size="2">The <a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht 
        Engine</a> Documentation &copy; 2003-2009 by Nikolaus Gebhardt. Generated 
        on Sun Jan 10 09:24:19 2010 by <a href="http://www.doxygen.org" target="_blank">Doxygen</a> 
        (1.5.6)</font></em></small></div></td>
  </tr>
</table>
<address style="align: right;">
</address>
</body>
</html>