Sophie

Sophie

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

crystalspace-doc-1.2.1-5mdv2010.0.i586.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>Crystal Space 1.2.1: iTextureManager Struct Reference (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li class="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<h1>iTextureManager Struct Reference<br>
<small>
[<a class="el" href="group__gfx3d.html">3D</a>]</small>
</h1><!-- doxytag: class="iTextureManager" --><!-- doxytag: inherits="iBase" -->This is the standard texture manager interface.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="ivideo_2txtmgr_8h-source.html">ivideo/txtmgr.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for iTextureManager:</div>
<div class="dynsection">
<p><center><img src="structiTextureManager__inherit__graph.png" border="0" usemap="#iTextureManager__inherit__map" alt="Inheritance graph"></center>
<map name="iTextureManager__inherit__map">
<area shape="rect" href="classscfImplementation1.html" title="scfImplementation1\&lt; csTextureManager, iTextureManager \&gt;" alt="" coords="5,161,416,188"><area shape="rect" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one..." alt="" coords="183,7,239,33"><area shape="rect" href="classcsTextureManager.html" title="General version of the texture manager." alt="" coords="141,239,280,265"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="structiTextureManager-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="classcsPtr.html">csPtr</a><br>
&lt; <a class="el" href="structiSuperLightmap.html">iSuperLightmap</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiTextureManager.html#1d1a6355bdd5457832d4258d9222e903">CreateSuperLightmap</a> (int width, int height)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a new super lightmap with the specified dimensions.  <a href="#1d1a6355bdd5457832d4258d9222e903"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classcsPtr.html">csPtr</a><br>
&lt; <a class="el" href="structiTextureHandle.html">iTextureHandle</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiTextureManager.html#c33a27b94680288e287279d7725303dc">CreateTexture</a> (int w, int h, <a class="el" href="group__gfx2d.html#ge62190ffec24a286b2d4b50dcb899469">csImageType</a> imagetype, const char *format, int flags, <a class="el" href="structiString.html">iString</a> *fail_reason=0)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a new texture with the given texture format.  <a href="#c33a27b94680288e287279d7725303dc"></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="structiTextureManager.html#00d44347aa287c0f1cf7612174de2011">GetMaxTextureSize</a> (int &amp;w, int &amp;h, int &amp;aspect)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request maximum texture dimensions.  <a href="#00d44347aa287c0f1cf7612174de2011"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiTextureManager.html#61e0b4374dca9dc81597d64744a81611">GetTextureFormat</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Query the basic format of textures that can be registered with this texture manager.  <a href="#61e0b4374dca9dc81597d64744a81611"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classcsPtr.html">csPtr</a><br>
&lt; <a class="el" href="structiTextureHandle.html">iTextureHandle</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiTextureManager.html#d0d411c423ec7bcf0ca248832d30218f">RegisterTexture</a> (<a class="el" href="structiImage.html">iImage</a> *image, int flags, <a class="el" href="structiString.html">iString</a> *fail_reason=0)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Register a texture.  <a href="#d0d411c423ec7bcf0ca248832d30218f"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This is the standard texture manager interface. 
<p>
A 3D rasterizer will have to implement a subclass of this one and return a pointer to it in Graphics3D. This class is responsible for receiving all textures from the 3D engine, converting them to an internal format if needed, calculating a palette if needed, and calculating all lookup tables related to the textures. Mipmap creation is also done in this class.<p>
Main creators of instances implementing this interface:<ul>
<li>The 3D renderers create an instance of this.</li></ul>
<p>
Main ways to get pointers to this interface:<ul>
<li><a class="el" href="structiGraphics3D.html#ef1348b61f24373625532f2b4c10d8c7" title="Retrieve the texture manager.">iGraphics3D::GetTextureManager()</a> </li></ul>

<p>Definition at line <a class="el" href="ivideo_2txtmgr_8h-source.html#l00167">167</a> of file <a class="el" href="ivideo_2txtmgr_8h-source.html">txtmgr.h</a>.</p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="1d1a6355bdd5457832d4258d9222e903"></a><!-- doxytag: member="iTextureManager::CreateSuperLightmap" ref="1d1a6355bdd5457832d4258d9222e903" args="(int width, int height)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classcsPtr.html">csPtr</a>&lt;<a class="el" href="structiSuperLightmap.html">iSuperLightmap</a>&gt; iTextureManager::CreateSuperLightmap           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>height</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a new super lightmap with the specified dimensions. 
<p>

</div>
</div><p>
<a class="anchor" name="c33a27b94680288e287279d7725303dc"></a><!-- doxytag: member="iTextureManager::CreateTexture" ref="c33a27b94680288e287279d7725303dc" args="(int w, int h, csImageType imagetype, const char *format, int flags, iString *fail_reason=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classcsPtr.html">csPtr</a>&lt;<a class="el" href="structiTextureHandle.html">iTextureHandle</a>&gt; iTextureManager::CreateTexture           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gfx2d.html#ge62190ffec24a286b2d4b50dcb899469">csImageType</a>&nbsp;</td>
          <td class="paramname"> <em>imagetype</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structiString.html">iString</a> *&nbsp;</td>
          <td class="paramname"> <em>fail_reason</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a new texture with the given texture format. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>w</em>&nbsp;</td><td>Horizontal size of the texture. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>Vertical size of the texture. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>imagetype</em>&nbsp;</td><td>Type of the image. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format</em>&nbsp;</td><td>A texture format string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>Contains one or several of CS_TEXTURE_XXX flags OR'ed together. They define the mode texture is going to be used in. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fail_reason</em>&nbsp;</td><td>An optional string which will be filled with the reason for failure if there was a failure. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A new texture handle or 0 if the texture couldn't be created for some reason. The reason will be put in the optional <em>fail_reason</em> parameter. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__gfx3d.html">Texture format strings</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="00d44347aa287c0f1cf7612174de2011"></a><!-- doxytag: member="iTextureManager::GetMaxTextureSize" ref="00d44347aa287c0f1cf7612174de2011" args="(int &amp;w, int &amp;h, int &amp;aspect)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void iTextureManager::GetMaxTextureSize           </td>
          <td>(</td>
          <td class="paramtype">int &amp;&nbsp;</td>
          <td class="paramname"> <em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&nbsp;</td>
          <td class="paramname"> <em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&nbsp;</td>
          <td class="paramname"> <em>aspect</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Request maximum texture dimensions. 
<p>

</div>
</div><p>
<a class="anchor" name="61e0b4374dca9dc81597d64744a81611"></a><!-- doxytag: member="iTextureManager::GetTextureFormat" ref="61e0b4374dca9dc81597d64744a81611" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int iTextureManager::GetTextureFormat           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Query the basic format of textures that can be registered with this texture manager. 
<p>
It is very likely that the texture manager will reject the texture if it is in an improper format. The alpha channel is optional; the texture can have it and can not have it. Only the bits that fit the CS_IMGFMT_MASK mask matters. 
</div>
</div><p>
<a class="anchor" name="d0d411c423ec7bcf0ca248832d30218f"></a><!-- doxytag: member="iTextureManager::RegisterTexture" ref="d0d411c423ec7bcf0ca248832d30218f" args="(iImage *image, int flags, iString *fail_reason=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classcsPtr.html">csPtr</a>&lt;<a class="el" href="structiTextureHandle.html">iTextureHandle</a>&gt; iTextureManager::RegisterTexture           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structiImage.html">iImage</a> *&nbsp;</td>
          <td class="paramname"> <em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structiString.html">iString</a> *&nbsp;</td>
          <td class="paramname"> <em>fail_reason</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Register a texture. 
<p>
The given input image is IncRef'd and DecRef'ed later when no longer needed. If you want to keep the input image make sure you have called IncRef yourselves.<p>
The texture is not converted immediately. Instead, you can make intermediate calls to <a class="el" href="structiTextureHandle.html#d24caa35c6cb13be24f717f71e6c7a2d" title="Enable key color.">iTextureHandle::SetKeyColor</a> ().<p>
This function returns a handle which should be given to the 3D rasterizer or 2D driver when drawing or otherwise using the texture.<p>
The texture manager will reject the texture if it is an inappropiate format (see GetTextureFormat () method).<p>
The texture is unregistered at destruction, i.e. as soon as the last reference to the texture handle is released.<p>
Note! This function will NOT scale the texture to fit hardware restrictions. This is done later before texture is first used.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>image</em>&nbsp;</td><td>is the source image. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>contains one or several of CS_TEXTURE_XXX flags OR'ed together. They define the mode texture is going to be used in. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fail_reason</em>&nbsp;</td><td>is an optional string which will be filled with the reason for failure if there was a failure. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>a new texture handle or 0 if the texture couldn't be created for some reason. The reason will be put in the optional 'fail_reason' parameter. </dd></dl>

</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>ivideo/<a class="el" href="ivideo_2txtmgr_8h-source.html">txtmgr.h</a></ul>
<hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>