Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 4111

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created by texi2html 1.76 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>

-->
<head>
<title>Crystal Space 1.2.1: C.2.7 Texture and Material Related Changes</title>

<meta name="description" content="Crystal Space 1.2.1: C.2.7 Texture and Material Related Changes">
<meta name="keywords" content="Crystal Space 1.2.1: C.2.7 Texture and Material Related Changes">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.76">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Api1_005f0-Texture-and-Material-Related-Changes"></a>
<a name="0"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="Api1_005f0-Identifier-Changes.html#0" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="Api1_005f0-Libraries-and-Headers.html#0" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="Release-Notes.html#0" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="Release-Notes-1_005f0.html#0" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="Licenses.html#0" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="index.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="cs_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="cs_Index.html#0" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="cs_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<hr size="1">
<h3 class="subsection"> C.2.7 Texture and Material Related Changes </h3>

<a name="1"></a>
<h4 class="subsubheading"> Texture and Material Preparation </h4>

<p>Texture and material preparation is now fully automatic. It is no longer
necessary to <em>prepare</em> a texture or a material before you can use it. It is
sufficient simply to register the texture or material. This means that the
following functions have been removed (and you can just remove invocations of
them from your applications if you used them):
</p>
<ul>
<li>
<code>iMaterialHandle::Prepare()</code>
</li><li>
<code>iTextureHandle::Prepare()</code>
</li><li>
<code>iTextureManager::PrepareMaterials()</code>
</li><li>
<code>iTextureManager::PrepareTextures()</code>
</li></ul>

<a name="2"></a>
<h4 class="subsubheading"> Material Registration </h4>

<p>Registering an <samp>&lsquo;iMaterialWrapper&rsquo;</samp> with the texture manager is no longer
necessary; any such calls can be removed.
</p>
<a name="3"></a>
<h4 class="subsubheading"> Procedural Texture Relocation </h4>
 
<p>Implementations of the standard procedural textures (dots, fire, plasma, etc.)
now reside directly in the <tt>&lsquo;stdpt&rsquo;</tt> plugin
(<tt>&lsquo;CS/plugins/proctex/standard&rsquo;</tt>), rather than in the <tt>&lsquo;cstool&rsquo;</tt>
module. Consequently, the following previously public headers are no longer
available:
</p> 
<ul>
<li>
<code>cstool/prdots.h</code>
</li><li>
<code>cstool/prfire.h</code>
</li><li>
<code>cstool/prplasma.h</code>
</li><li>
<code>cstool/prsky.h</code>
</li><li>
<code>cstool/prwater.h</code>
</li></ul>
 
<p>Likewise, procedural textures can no longer be allocated directly (for
instance, via <samp>&lsquo;new csProcFire&rsquo;</samp>).  Instead, you must now use the plugin
system to create such textures. For example:
</p> 
<table><tr><td>&nbsp;</td><td><pre class="example">csRef&lt;iTextureType&gt; type = csLoadPluginCheck&lt;iTextureType&gt; (object_reg,
  &quot;crystalspace.texture.type.fire&quot;));
if (!type) return false;	// Error
csRef&lt;iTextureFactory&gt; fireFact = type-&gt;NewFactory();
csRef&lt;iTextureWrapper&gt; tex = fireFact-&gt;Generate();
csRef&lt;iFireTexture&gt; fire = scfQueryInterface&lt;iFireTexture&gt; (tex);
</pre></td></tr></table> 
<p>Various procedural textures may or may not implement their own custom <small>SCF</small>
interfaces beyond the normal interfaces implemented by all procedural
textures. In the example above, the &ldquo;fire&rdquo; texture implements the specialized
<samp>&lsquo;iFireTexture&rsquo;</samp>.
</p>
<hr size="1">
<p>
 <font size="-1">
  This document was generated using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
 </font>
 <br>

</p>
</body>
</html>