Sophie

Sophie

distrib > Mandriva > 2011.0 > i586 > by-pkgid > a16d689bc65aac5d987d5129109e6de5 > files > 265

irrlicht-doc-1.7.2-1.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>Irrlicht Engine: ITexture.h Source File</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.6.2 -->
<h1>ITexture.h</h1><a href="_i_texture_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2002-2010 Nikolaus Gebhardt</span>
<a name="l00002"></a>00002 <span class="comment">// This file is part of the &quot;Irrlicht Engine&quot;.</span>
<a name="l00003"></a>00003 <span class="comment">// For conditions of distribution and use, see copyright notice in irrlicht.h</span>
<a name="l00004"></a>00004 
<a name="l00005"></a>00005 <span class="preprocessor">#ifndef __I_TEXTURE_H_INCLUDED__</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __I_TEXTURE_H_INCLUDED__</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;<a class="code" href="_i_reference_counted_8h.html">IReferenceCounted.h</a>&quot;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;<a class="code" href="_i_image_8h.html">IImage.h</a>&quot;</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;<a class="code" href="dimension2d_8h.html">dimension2d.h</a>&quot;</span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;<a class="code" href="_e_driver_types_8h.html">EDriverTypes.h</a>&quot;</span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;<a class="code" href="path_8h.html">path.h</a>&quot;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;<a class="code" href="matrix4_8h.html">matrix4.h</a>&quot;</span>
<a name="l00014"></a>00014 
<a name="l00015"></a>00015 <span class="keyword">namespace </span>irr
<a name="l00016"></a>00016 {
<a name="l00017"></a>00017 <span class="keyword">namespace </span>video
<a name="l00018"></a>00018 {
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 
<a name="l00022"></a><a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876f">00022</a> <span class="keyword">enum</span> <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876f" title="Enumeration flags telling the video driver in which format textures should be created...">E_TEXTURE_CREATION_FLAG</a>
<a name="l00023"></a>00023 {
<a name="l00032"></a><a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa4fe1c1b0f4b44ef4b5da219ce66a0ae8">00032</a>         <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa4fe1c1b0f4b44ef4b5da219ce66a0ae8">ETCF_ALWAYS_16_BIT</a> = 0x00000001,
<a name="l00033"></a>00033 
<a name="l00041"></a><a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa20881e307a778c4a4fbb5327a60a93bb">00041</a>         <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa20881e307a778c4a4fbb5327a60a93bb">ETCF_ALWAYS_32_BIT</a> = 0x00000002,
<a name="l00042"></a>00042 
<a name="l00049"></a><a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fadc5336eb55e0221ef0d7e53c1cf5a2b9">00049</a>         <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fadc5336eb55e0221ef0d7e53c1cf5a2b9">ETCF_OPTIMIZED_FOR_QUALITY</a> = 0x00000004,
<a name="l00050"></a>00050 
<a name="l00056"></a><a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa01693eaffcfeca7de6fcd7e826a909c3">00056</a>         <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa01693eaffcfeca7de6fcd7e826a909c3">ETCF_OPTIMIZED_FOR_SPEED</a> = 0x00000008,
<a name="l00057"></a>00057 
<a name="l00059"></a><a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa288b302e9d4faaba80c7796c7bc1682c">00059</a>         <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa288b302e9d4faaba80c7796c7bc1682c">ETCF_CREATE_MIP_MAPS</a> = 0x00000010,
<a name="l00060"></a>00060 
<a name="l00062"></a><a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fab9ce08dff03ebff9139b594610561609">00062</a>         <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fab9ce08dff03ebff9139b594610561609">ETCF_NO_ALPHA_CHANNEL</a> = 0x00000020,
<a name="l00063"></a>00063 
<a name="l00065"></a>00065 
<a name="l00066"></a><a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa6a834e40d35e01205ab63f3ce6d71172">00066</a>         <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa6a834e40d35e01205ab63f3ce6d71172" title="Allow the Driver to use Non-Power-2-Textures.">ETCF_ALLOW_NON_POWER_2</a> = 0x00000040,
<a name="l00067"></a>00067 
<a name="l00070"></a><a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa0081685b8fa033d771f9c6a5bded8253">00070</a>         <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa0081685b8fa033d771f9c6a5bded8253">ETCF_FORCE_32_BIT_DO_NOT_USE</a> = 0x7fffffff
<a name="l00071"></a>00071 };
<a name="l00072"></a>00072 
<a name="l00073"></a>00073 
<a name="l00075"></a>00075 
<a name="l00083"></a><a class="code" href="classirr_1_1video_1_1_i_texture.html">00083</a> <span class="keyword">class </span><a class="code" href="classirr_1_1video_1_1_i_texture.html" title="Interface of a Video Driver dependent Texture.">ITexture</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="classirr_1_1_i_reference_counted.html" title="Base class of most objects of the Irrlicht Engine.">IReferenceCounted</a>
<a name="l00084"></a>00084 {
<a name="l00085"></a>00085 <span class="keyword">public</span>:
<a name="l00086"></a>00086 
<a name="l00088"></a><a class="code" href="classirr_1_1video_1_1_i_texture.html#a32dbd62fef8a65f11e5b440706346c90">00088</a>         <a class="code" href="classirr_1_1video_1_1_i_texture.html#a32dbd62fef8a65f11e5b440706346c90" title="constructor">ITexture</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">io::path</a>&amp; name) : <a class="code" href="classirr_1_1video_1_1_i_texture.html#ad1ab74da43861e50f0ec6a2e9a813fb4">NamedPath</a>(name)
<a name="l00089"></a>00089         {
<a name="l00090"></a>00090         }
<a name="l00091"></a>00091 
<a name="l00093"></a>00093 
<a name="l00105"></a>00105         <span class="keyword">virtual</span> <span class="keywordtype">void</span>* <a class="code" href="classirr_1_1video_1_1_i_texture.html#a8ff2e8b1c887d779267a8db830f4b87f" title="Lock function.">lock</a>(<span class="keywordtype">bool</span> readOnly = <span class="keyword">false</span>, <a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> mipmapLevel=0) = 0;
<a name="l00106"></a>00106 
<a name="l00108"></a>00108 
<a name="l00109"></a>00109         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1video_1_1_i_texture.html#a15b9a25aa18528ade37a492bd7b20a10" title="Unlock function. Must be called after a lock() to the texture.">unlock</a>() = 0;
<a name="l00110"></a>00110 
<a name="l00112"></a>00112 
<a name="l00119"></a>00119         <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html">core::dimension2d&lt;u32&gt;</a>&amp; <a class="code" href="classirr_1_1video_1_1_i_texture.html#adbb05bcee8ec7fa11bb4ccfdb725cda8" title="Get original size of the texture.">getOriginalSize</a>() <span class="keyword">const</span> = 0;
<a name="l00120"></a>00120 
<a name="l00122"></a>00122 
<a name="l00123"></a>00123         <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html">core::dimension2d&lt;u32&gt;</a>&amp; <a class="code" href="classirr_1_1video_1_1_i_texture.html#adfcf9558c0f1ae543782c03f7903c48e" title="Get dimension (=size) of the texture.">getSize</a>() <span class="keyword">const</span> = 0;
<a name="l00124"></a>00124 
<a name="l00126"></a>00126 
<a name="l00130"></a>00130         <span class="keyword">virtual</span> <a class="code" href="namespaceirr_1_1video.html#ae35a6de6d436c76107ad157fe42356d0" title="An enum for all types of drivers the Irrlicht Engine supports.">E_DRIVER_TYPE</a> <a class="code" href="classirr_1_1video_1_1_i_texture.html#a4c6abdc0c789e6022e4e1b8a06cfab71" title="Get driver type of texture.">getDriverType</a>() <span class="keyword">const</span> = 0;
<a name="l00131"></a>00131 
<a name="l00133"></a>00133 
<a name="l00134"></a>00134         <span class="keyword">virtual</span> <a class="code" href="namespaceirr_1_1video.html#a1d5e487888c32b1674a8f75116d829ed" title="An enum for the color format of textures used by the Irrlicht Engine.">ECOLOR_FORMAT</a> <a class="code" href="classirr_1_1video_1_1_i_texture.html#a48bbc0208c046724fc3264406f774132" title="Get the color format of texture.">getColorFormat</a>() <span class="keyword">const</span> = 0;
<a name="l00135"></a>00135 
<a name="l00137"></a>00137 
<a name="l00140"></a>00140         <span class="keyword">virtual</span> <a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> <a class="code" href="classirr_1_1video_1_1_i_texture.html#a14fd1eba217a0dd86b40c4d792ab14ea" title="Get pitch of texture (in bytes).">getPitch</a>() <span class="keyword">const</span> = 0;
<a name="l00141"></a>00141 
<a name="l00143"></a>00143 
<a name="l00144"></a><a class="code" href="classirr_1_1video_1_1_i_texture.html#a37444068f2f292c43c2ffd516a32a764">00144</a>         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1video_1_1_i_texture.html#a37444068f2f292c43c2ffd516a32a764" title="Check whether the texture has MipMaps.">hasMipMaps</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00145"></a>00145 
<a name="l00147"></a><a class="code" href="classirr_1_1video_1_1_i_texture.html#a38b90ca5d956bd9772f2aa8032b38cd5">00147</a>         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1video_1_1_i_texture.html#a38b90ca5d956bd9772f2aa8032b38cd5" title="Returns if the texture has an alpha channel.">hasAlpha</a>()<span class="keyword"> const </span>{
<a name="l00148"></a>00148                 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1video_1_1_i_texture.html#a48bbc0208c046724fc3264406f774132" title="Get the color format of texture.">getColorFormat</a> () == <a class="code" href="namespaceirr_1_1video.html#a1d5e487888c32b1674a8f75116d829eda55c57d63efff39efe33ee733fe962df0" title="Default 32 bit color format. 8 bits are used for every component: red, green, blue...">video::ECF_A8R8G8B8</a> || <a class="code" href="classirr_1_1video_1_1_i_texture.html#a48bbc0208c046724fc3264406f774132" title="Get the color format of texture.">getColorFormat</a> () == <a class="code" href="namespaceirr_1_1video.html#a1d5e487888c32b1674a8f75116d829eda1207765b5eab1701111b5dc37b68b4bf" title="16 bit color format used by the software driver.">video::ECF_A1R5G5B5</a>;
<a name="l00149"></a>00149         }
<a name="l00150"></a>00150 
<a name="l00152"></a>00152 
<a name="l00153"></a>00153         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1video_1_1_i_texture.html#a9517c37f071479d0698cdf597f8fea45" title="Regenerates the mip map levels of the texture.">regenerateMipMapLevels</a>(<span class="keywordtype">void</span>* mipmapData=0) = 0;
<a name="l00154"></a>00154 
<a name="l00156"></a>00156 
<a name="l00157"></a><a class="code" href="classirr_1_1video_1_1_i_texture.html#ab085e1f1a76a55ab4c5fcdfdeedfb45c">00157</a>         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1video_1_1_i_texture.html#ab085e1f1a76a55ab4c5fcdfdeedfb45c" title="Check whether the texture is a render target.">isRenderTarget</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00158"></a>00158 
<a name="l00160"></a><a class="code" href="classirr_1_1video_1_1_i_texture.html#acad4f8a4e9b8de5683eebbd7451e2009">00160</a>         <span class="keyword">const</span> <a class="code" href="structirr_1_1io_1_1_s_named_path.html" title="Used in places where we identify objects by a filename, but don&amp;#39;t actually work...">io::SNamedPath</a>&amp; <a class="code" href="classirr_1_1video_1_1_i_texture.html#acad4f8a4e9b8de5683eebbd7451e2009" title="Get name of texture (in most cases this is the filename).">getName</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1video_1_1_i_texture.html#ad1ab74da43861e50f0ec6a2e9a813fb4">NamedPath</a>; }
<a name="l00161"></a>00161 
<a name="l00162"></a>00162 <span class="keyword">protected</span>:
<a name="l00163"></a>00163 
<a name="l00165"></a>00165 
<a name="l00167"></a><a class="code" href="classirr_1_1video_1_1_i_texture.html#afff3160f6aa5f749365ae4f776a440f3">00167</a>         <span class="keyword">inline</span> <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876f" title="Enumeration flags telling the video driver in which format textures should be created...">E_TEXTURE_CREATION_FLAG</a> <a class="code" href="classirr_1_1video_1_1_i_texture.html#afff3160f6aa5f749365ae4f776a440f3" title="Helper function, helps to get the desired texture creation format from the flags...">getTextureFormatFromFlags</a>(<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> flags)
<a name="l00168"></a>00168         {
<a name="l00169"></a>00169                 <span class="keywordflow">if</span> (flags &amp; <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa01693eaffcfeca7de6fcd7e826a909c3">ETCF_OPTIMIZED_FOR_SPEED</a>)
<a name="l00170"></a>00170                         <span class="keywordflow">return</span> ETCF_OPTIMIZED_FOR_SPEED;
<a name="l00171"></a>00171                 <span class="keywordflow">if</span> (flags &amp; <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa4fe1c1b0f4b44ef4b5da219ce66a0ae8">ETCF_ALWAYS_16_BIT</a>)
<a name="l00172"></a>00172                         <span class="keywordflow">return</span> ETCF_ALWAYS_16_BIT;
<a name="l00173"></a>00173                 <span class="keywordflow">if</span> (flags &amp; <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fa20881e307a778c4a4fbb5327a60a93bb">ETCF_ALWAYS_32_BIT</a>)
<a name="l00174"></a>00174                         <span class="keywordflow">return</span> ETCF_ALWAYS_32_BIT;
<a name="l00175"></a>00175                 <span class="keywordflow">if</span> (flags &amp; <a class="code" href="namespaceirr_1_1video.html#acaf6f7414534f7d62bff18c5bf11876fadc5336eb55e0221ef0d7e53c1cf5a2b9">ETCF_OPTIMIZED_FOR_QUALITY</a>)
<a name="l00176"></a>00176                         <span class="keywordflow">return</span> ETCF_OPTIMIZED_FOR_QUALITY;
<a name="l00177"></a>00177                 <span class="keywordflow">return</span> ETCF_OPTIMIZED_FOR_SPEED;
<a name="l00178"></a>00178         }
<a name="l00179"></a>00179 
<a name="l00180"></a><a class="code" href="classirr_1_1video_1_1_i_texture.html#ad1ab74da43861e50f0ec6a2e9a813fb4">00180</a>         <a class="code" href="structirr_1_1io_1_1_s_named_path.html" title="Used in places where we identify objects by a filename, but don&amp;#39;t actually work...">io::SNamedPath</a> <a class="code" href="classirr_1_1video_1_1_i_texture.html#ad1ab74da43861e50f0ec6a2e9a813fb4">NamedPath</a>;
<a name="l00181"></a>00181 };
<a name="l00182"></a>00182 
<a name="l00183"></a>00183 
<a name="l00184"></a>00184 } <span class="comment">// end namespace video</span>
<a name="l00185"></a>00185 } <span class="comment">// end namespace irr</span>
<a name="l00186"></a>00186 
<a name="l00187"></a>00187 <span class="preprocessor">#endif</span>
<a name="l00188"></a>00188 <span class="preprocessor"></span>
</pre></div></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-2010 by Nikolaus Gebhardt. Generated 
        on Sun Oct 24 12:41:57 2010 by <a href="http://www.doxygen.org" target="_blank">Doxygen</a> 
        (1.6.2)</font></em></small></div></td>
  </tr>
</table>
<address style="align: right;">
</address>
</body>
</html>