diff options
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/a03489.html | 6006 |
1 files changed, 6006 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03489.html b/docs/doxygen/nel/a03489.html new file mode 100644 index 00000000..3bac2881 --- /dev/null +++ b/docs/doxygen/nel/a03489.html @@ -0,0 +1,6006 @@ +<!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::CTextureBump 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::CTextureBump Class Reference</h1><code>#include <<a class="el" href="a06512.html">texture_bump.h</a>></code> +<p> +<p>Inheritance diagram for NL3D::CTextureBump: +<p><center><img src="a03489.png" usemap="#NL3D::CTextureBump_map" border="0" alt=""></center> +<map name="NL3D::CTextureBump_map"> +<area href="a03487.html" alt="NL3D::ITexture" shape="rect" coords="142,112,274,136"> +<area href="a02268.html" alt="NLMISC::CBitmap" shape="rect" coords="0,56,132,80"> +<area href="a02209.html" alt="NLMISC::CRefCount" shape="rect" coords="142,56,274,80"> +<area href="a02867.html" alt="NLMISC::IStreamable" shape="rect" coords="284,56,416,80"> +<area href="a02540.html" alt="NLMISC::IClassable" shape="rect" coords="284,0,416,24"> +</map> +<hr><a name="_details"></a><h2>Detailed Description</h2> +This texture is a helper to build a DsDt texture from a height map (provided it is supported by hardware) The height map should be convertible to a RGBA bitmap <dl compact><dt><b>Author:</b></dt><dd>Nicolas Vizerie <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a06512.html#l00042">42</a> of file <a class="el" href="a06512.html">texture_bump.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Public Types</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturew29">TMagFilter</a> { <a class="el" href="a03487.html#NL3D_1_1ITexturew29NL3D_1_1ITexturew18">Nearest</a> = 0, +<a class="el" href="a03487.html#NL3D_1_1ITexturew29NL3D_1_1ITexturew10">Linear</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew29NL3D_1_1ITexturew15">MagFilterCount</a> + }</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturew30">TMinFilter</a> { <br> + <a class="el" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew21">NearestMipMapOff</a> = 0, +<a class="el" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew20">NearestMipMapNearest</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew19">NearestMipMapLinear</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew13">LinearMipMapOff</a>, +<br> + <a class="el" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew12">LinearMipMapNearest</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew11">LinearMipMapLinear</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew16">MinFilterCount</a> +<br> + }</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturew31">TType</a> { <br> + <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a> = 0, +<a class="el" href="a02268.html#NL3D_1_1ITexturew31NLMISC_1_1CBitmapw8">Luminance</a>, +<a class="el" href="a02268.html#NL3D_1_1ITexturew31NLMISC_1_1CBitmapw0">Alpha</a>, +<a class="el" href="a02268.html#NL3D_1_1ITexturew31NLMISC_1_1CBitmapw1">AlphaLuminance</a>, +<br> + <a class="el" href="a02268.html#NL3D_1_1ITexturew31NLMISC_1_1CBitmapw4">DXTC1</a>, +<a class="el" href="a02268.html#NL3D_1_1ITexturew31NLMISC_1_1CBitmapw5">DXTC1Alpha</a>, +<a class="el" href="a02268.html#NL3D_1_1ITexturew31NLMISC_1_1CBitmapw6">DXTC3</a>, +<a class="el" href="a02268.html#NL3D_1_1ITexturew31NLMISC_1_1CBitmapw7">DXTC5</a>, +<br> + <a class="el" href="a02268.html#NL3D_1_1ITexturew31NLMISC_1_1CBitmapw3">DsDt</a>, +<a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew17">ModeCount</a>, +<a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew4">DonTKnow</a> = 0xffffffff +<br> + }</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturew32">TUploadFormat</a> { <br> + <a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew2">Auto</a> = 0, +<a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew28">RGBA8888</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew26">RGBA4444</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew27">RGBA5551</a>, +<br> + <a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew24">RGB888</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew23">RGB565</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew6">DXTC1</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew7">DXTC1Alpha</a>, +<br> + <a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew8">DXTC3</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew9">DXTC5</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew14">Luminance</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew0">Alpha</a>, +<br> + <a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew1">AlphaLuminance</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew5">DsDt</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew34">UploadFormatCount</a> +<br> + }</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturew33">TWrapMode</a> { <a class="el" href="a03487.html#NL3D_1_1ITexturew33NL3D_1_1ITexturew22">Repeat</a> = 0, +<a class="el" href="a03487.html#NL3D_1_1ITexturew33NL3D_1_1ITexturew3">Clamp</a>, +<a class="el" href="a03487.html#NL3D_1_1ITexturew33NL3D_1_1ITexturew35">WrapModeCount</a> + }</td></tr> + +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturea0">allowDegradation</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Does this texture allow the driver to degrade. <a href="#NL3D_1_1ITexturea0"></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="a02268.html#NL3D_1_1ITexturea1">blend</a> (<a class="el" href="a02268.html">CBitmap</a> &Bm0, <a class="el" href="a02268.html">CBitmap</a> &Bm1, <a class="el" href="a04558.html#a9">uint16</a> factor, bool inputBitmapIsMutable=false)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea2">blit</a> (const <a class="el" href="a02268.html">CBitmap</a> *<a class="el" href="a04223.html#a652">src</a>, <a class="el" href="a04558.html#a10">sint32</a> <a class="el" href="a04223.html#a572">x</a>, <a class="el" href="a04558.html#a10">sint32</a> <a class="el" href="a04223.html#a573">y</a>)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea3">buildMipMaps</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a03487.html">ITexture</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturea4">buildNonSelectableVersion</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a566">index</a>)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturea5">clearTouched</a> (void)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea6">convertToType</a> (<a class="el" href="a02268.html#NL3D_1_1ITexturew31">TType</a> <a class="el" href="a04223.html#a581">type</a>)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa7">CTextureBump</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">ctor <a href="#NL3D_1_1CTextureBumpa7"></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="a03489.html#NL3D_1_1CTextureBumpa8">enableSharing</a> (bool enabled=true)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea7">flipH</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea8">flipV</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa11">forceNormalize</a> (bool force=true)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate</a> (bool async=false)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa13">getAbsoluteOffsets</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual std::string </td><td class="memItemRight" valign=bottom><a class="el" href="a02540.html#NL3D_1_1ITrackKeyFramer_3_01CKeyVector_01_4a6">getClassName</a> ()=0</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03338.html">CRGBAF</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea11">getColor</a> (float <a class="el" href="a04223.html#a572">x</a>, float <a class="el" href="a04223.html#a573">y</a>) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea12">getHeight</a> (<a class="el" href="a04558.html#a11">uint32</a> numMipMap=0) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03487.html">ITexture</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa17">getHeightMap</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">get the height map used to generate this bumpmap (const version) <a href="#NL3D_1_1CTextureBumpa17"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03487.html">ITexture</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa18">getHeightMap</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">get the height map used to generate this bumpmap <a href="#NL3D_1_1CTextureBumpa18"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea13">getMipMapCount</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa20">getNormalizationFactor</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">============================================================================================== <a href="#NL3D_1_1CTextureBumpa20"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03337.html">CRGBA</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea14">getPixelColor</a> (<a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a04223.html#a572">x</a>, <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a04223.html#a573">y</a>, <a class="el" href="a04558.html#a11">uint32</a> numMipMap=0) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02268.html#NL3D_1_1ITexturew31">TType</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea15">getPixelFormat</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a04558.html#a14">sint</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a02209.html#NLGEORGES_1_1UTypea8">getRefCount</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturea17">getReleasable</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual std::string </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa25">getShareName</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">============================================================================================== <a href="#NL3D_1_1CTextureBumpa25"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa26">getSignedFormat</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea19">getSize</a> (<a class="el" href="a04558.html#a11">uint32</a> numMipMap=0) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea20">getWidth</a> (<a class="el" href="a04558.html#a11">uint32</a> numMipMap=0) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturea21">isAllInvalidated</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa30">isBumpMap</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea23">isGrayscaleAsAlpha</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa32">isNormalizationForced</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Test wether normalization is forced with that texture. <a href="#NL3D_1_1CTextureBumpa32"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturea24">isSelectable</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Test wether this texture is selectable. <a href="#NL3D_1_1ITexturea24"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa34">isSharingEnabled</a> () const </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="a02268.html#NL3D_1_1ITexturea25">load</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &f, <a class="el" href="a04558.html#a15">uint</a> mipMapSkip=0)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea26">loadGrayscaleAsAlpha</a> (bool loadAsAlpha)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea27">makeDummy</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa38">NLMISC_DECLARE_CLASS</a> (<a class="el" href="a03489.html">CTextureBump</a>)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa39">release</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">============================================================================================== <a href="#NL3D_1_1CTextureBumpa39"></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="a03487.html#NL3D_1_1ITexturea29">releaseDriverSetup</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Release the Driver info for this texture (if any). Call it with care. <a href="#NL3D_1_1ITexturea29"></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="a02268.html#NL3D_1_1ITexturea30">releaseMipMaps</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea31">resample</a> (<a class="el" href="a04558.html#a10">sint32</a> nNewWidth, <a class="el" href="a04558.html#a10">sint32</a> nNewHeight)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea32">reset</a> (<a class="el" href="a02268.html#NL3D_1_1ITexturew31">TType</a> <a class="el" href="a04223.html#a581">type</a>=RGBA)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea33">resize</a> (<a class="el" href="a04558.html#a10">sint32</a> nNewWidth, <a class="el" href="a04558.html#a10">sint32</a> nNewHeight, <a class="el" href="a02268.html#NL3D_1_1ITexturew31">TType</a> newType=DonTKnow, bool resetTo0=true)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea34">resizeMipMap</a> (<a class="el" href="a04558.html#a11">uint32</a> numMipMap, <a class="el" href="a04558.html#a10">sint32</a> nNewWidth, <a class="el" href="a04558.html#a10">sint32</a> nNewHeight, bool resetTo0=true)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea35">rot90CCW</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea36">rot90CW</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea37">rotateCCW</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturea38">selectTexture</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a566">index</a>)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa50">serial</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &f) throw (NLMISC::EStream)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">============================================================================================== <a href="#NL3D_1_1CTextureBumpa50"></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="a03489.html#NL3D_1_1CTextureBumpa51">setAbsoluteOffsets</a> (bool use=true)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">deprecated : absolute offsets are taken from the gradient of the height map <a href="#NL3D_1_1CTextureBumpa51"></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="a03489.html#NL3D_1_1CTextureBumpa52">setHeightMap</a> (<a class="el" href="a03487.html">ITexture</a> *heightMap)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">set the height map used to generate this bump map <a href="#NL3D_1_1CTextureBumpa52"></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="a02268.html#NL3D_1_1ITexturea40">setMipMapCount</a> (<a class="el" href="a04558.html#a11">uint32</a> mmc)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturea41">setReleasable</a> (bool <a class="el" href="a04223.html#a628">r</a>)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa55">setSignedFormat</a> (bool formatSigned)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturea42">setupedIntoDriver</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa57">supportSharing</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">============================================================================================== <a href="#NL3D_1_1CTextureBumpa57"></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="a03487.html#NL3D_1_1ITexturea44">touch</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturea45">touched</a> (void)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturea46">touchRect</a> (const <a class="el" href="a03319.html">NLMISC::CRect</a> &rect)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturea47">validateGenerateFlag</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea48">writeJPG</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &f, <a class="el" href="a04558.html#a7">uint8</a> quality=80)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturea49">writeTGA</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &f, <a class="el" href="a04558.html#a11">uint32</a> d, bool upsideDown=false)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpa64">~CTextureBump</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">============================================================================================== <a href="#NL3D_1_1CTextureBumpa64"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturee0">loadSize</a> (const std::string &path, <a class="el" href="a04558.html#a11">uint32</a> &retWidth, <a class="el" href="a04558.html#a11">uint32</a> &retHeight)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturee1">loadSize</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &f, <a class="el" href="a04558.html#a11">uint32</a> &<a class="el" href="a04223.html#a632">width</a>, <a class="el" href="a04558.html#a11">uint32</a> &<a class="el" href="a04223.html#a633">height</a>)</td></tr> + +<tr><td colspan=2><br><h2>Data Fields</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>std::list< <a class="el" href="a03319.html">NLMISC::CRect</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITextureo0">_ListInvalidRect</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02209.html#NLGEORGES_1_1UTypeo0">crefs</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>CPtrInfo * </td><td class="memItemRight" valign=bottom><a class="el" href="a02209.html#NLGEORGES_1_1UTypeo1">pinfo</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>enum <a class="el" href="a02268.html#NL3D_1_1ITexturew31">NLMISC::CBitmap::TType</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03321.html">NLMISC::CRefPtr</a>< <a class="el" href="a03496.html">CTextureDrvShare</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITextureo4">TextureDrvShare</a></td></tr> + +<tr><td colspan=2><br><h2>Static Public Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITextures0">bitPerPixels</a> [ModeCount]</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITextures1">DXTC1HEADER</a> = NL_MAKEFOURCC('D','X', 'T', '1')</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITextures2">DXTC3HEADER</a> = NL_MAKEFOURCC('D','X', 'T', '3')</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITextures3">DXTC5HEADER</a> = NL_MAKEFOURCC('D','X', 'T', '5')</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>CPtrInfo </td><td class="memItemRight" valign=bottom><a class="el" href="a02209.html#NLGEORGES_1_1UTypes0">NullPtrInfo</a></td></tr> + +<tr><td colspan=2><br><h2>Protected Types</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::map< std::string,<br> + <a class="el" href="a03490.html">CNormalizationInfo</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpx0">TNameToNI</a></td></tr> + +<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpb0">doGenerate</a> (bool async=false)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">============================================================================================== <a href="#NL3D_1_1CTextureBumpb0"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03000.html">CObjectVector</a>< <a class="el" href="a04558.html#a7">uint8</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturep0">_Data</a> [MAX_MIPMAP]</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpp1">_DisableSharing</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpp2">_ForceNormalize</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturep1">_Height</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03408.html">NLMISC::CSmartPtr</a>< <a class="el" href="a03487.html">ITexture</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturep2">_LoadGrayscaleAsAlpha</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="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>TNameToNI::iterator </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpp7">_NameToNFHandle</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>float * </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpp8">_NormalizationFactor</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpp9">_Signed</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03487.html#NL3D_1_1ITexturep4">_Touched</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpp11">_UseAbsoluteOffsets</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02268.html#NL3D_1_1ITexturep5">_Width</a></td></tr> + +<tr><td colspan=2><br><h2>Static Protected Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03489.html#NL3D_1_1CTextureBumpx0">TNameToNI</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpt0">_NameToNF</a></td></tr> + +<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03489.html#NL3D_1_1CTextureBumpd0">setFilterMode</a> (<a class="el" href="a03487.html#NL3D_1_1ITexturew29">TMagFilter</a> magf, <a class="el" href="a03487.html#NL3D_1_1ITexturew30">TMinFilter</a> minf)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">============================================================================================== <a href="#NL3D_1_1CTextureBumpd0"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Friends</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>struct </td><td class="memItemRight" valign=bottom><a class="el" href="a02209.html#NLGEORGES_1_1UTypen0">CPtrInfo</a></td></tr> + +</table> +<hr><h2>Member Typedef Documentation</h2> +<a class="anchor" name="NL3D_1_1CTextureBumpx0" doxytag="NL3D::CTextureBump::TNameToNI" ></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"> typedef std::map<std::string, <a class="el" href="a03490.html">CNormalizationInfo</a>> <a class="el" href="a03489.html#NL3D_1_1CTextureBumpx0">NL3D::CTextureBump::TNameToNI</a><code> [protected]</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="a06512.html#l00115">115</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. </td> + </tr> +</table> +<hr><h2>Member Enumeration Documentation</h2> +<a class="anchor" name="NL3D_1_1ITexturew29" doxytag="NL3D::CTextureBump::TMagFilter" ></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"> enum <a class="el" href="a03487.html#NL3D_1_1ITexturew29">NL3D::ITexture::TMagFilter</a><code> [inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Magnification mode. Same behavior as OpenGL.<dl compact><dt><b>Enumeration values: </b></dt><dd> +<table border=0 cellspacing=2 cellpadding=0> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew29NL3D_1_1ITexturew18" doxytag="Nearest" ></a>Nearest</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew29NL3D_1_1ITexturew10" doxytag="Linear" ></a>Linear</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew29NL3D_1_1ITexturew15" doxytag="MagFilterCount" ></a>MagFilterCount</em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a06506.html#l00148">148</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +Referenced by <a class="el" href="a06506.html#l00214">NL3D::ITexture::getMagFilter()</a>. +<p> +<div class="fragment"><pre>00149 { +00150 <a class="code" href="a03487.html#NL3D_1_1ITexturew29NL3D_1_1ITexturew18">Nearest</a>=0, +00151 <a class="code" href="a03487.html#NL3D_1_1ITexturew29NL3D_1_1ITexturew10">Linear</a>, +00152 +00153 <a class="code" href="a03487.html#NL3D_1_1ITexturew29NL3D_1_1ITexturew15">MagFilterCount</a> +00154 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturew30" doxytag="NL3D::CTextureBump::TMinFilter" ></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"> enum <a class="el" href="a03487.html#NL3D_1_1ITexturew30">NL3D::ITexture::TMinFilter</a><code> [inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Minifying mode. Same behavior as OpenGL. If the bitmap has no mipmap, and mipmap is required, then mipmaps are computed.<dl compact><dt><b>Enumeration values: </b></dt><dd> +<table border=0 cellspacing=2 cellpadding=0> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew30NL3D_1_1ITexturew21" doxytag="NearestMipMapOff" ></a>NearestMipMapOff</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew30NL3D_1_1ITexturew20" doxytag="NearestMipMapNearest" ></a>NearestMipMapNearest</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew30NL3D_1_1ITexturew19" doxytag="NearestMipMapLinear" ></a>NearestMipMapLinear</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew30NL3D_1_1ITexturew13" doxytag="LinearMipMapOff" ></a>LinearMipMapOff</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew30NL3D_1_1ITexturew12" doxytag="LinearMipMapNearest" ></a>LinearMipMapNearest</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew30NL3D_1_1ITexturew11" doxytag="LinearMipMapLinear" ></a>LinearMipMapLinear</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew30NL3D_1_1ITexturew16" doxytag="MinFilterCount" ></a>MinFilterCount</em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a06506.html#l00159">159</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +Referenced by <a class="el" href="a06506.html#l00215">NL3D::ITexture::getMinFilter()</a>. +<p> +<div class="fragment"><pre>00160 { +00161 <a class="code" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew21">NearestMipMapOff</a>=0, +00162 <a class="code" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew20">NearestMipMapNearest</a>, +00163 <a class="code" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew19">NearestMipMapLinear</a>, +00164 <a class="code" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew13">LinearMipMapOff</a>, +00165 <a class="code" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew12">LinearMipMapNearest</a>, +00166 <a class="code" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew11">LinearMipMapLinear</a>, +00167 +00168 <a class="code" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew16">MinFilterCount</a> +00169 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturew31" doxytag="NL3D::CTextureBump::TType" ></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"> enum <a class="el" href="a02268.html#NL3D_1_1ITexturew31">NLMISC::CBitmap::TType</a><code> [inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +<dl compact><dt><b>Enumeration values: </b></dt><dd> +<table border=0 cellspacing=2 cellpadding=0> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew31NL3D_1_1ITexturew25" doxytag="RGBA" ></a>RGBA</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew31NLMISC_1_1CBitmapw8" doxytag="Luminance" ></a>Luminance</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew31NLMISC_1_1CBitmapw0" doxytag="Alpha" ></a>Alpha</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew31NLMISC_1_1CBitmapw1" doxytag="AlphaLuminance" ></a>AlphaLuminance</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew31NLMISC_1_1CBitmapw4" doxytag="DXTC1" ></a>DXTC1</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew31NLMISC_1_1CBitmapw5" doxytag="DXTC1Alpha" ></a>DXTC1Alpha</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew31NLMISC_1_1CBitmapw6" doxytag="DXTC3" ></a>DXTC3</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew31NLMISC_1_1CBitmapw7" doxytag="DXTC5" ></a>DXTC5</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew31NLMISC_1_1CBitmapw3" doxytag="DsDt" ></a>DsDt</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew31NL3D_1_1ITexturew17" doxytag="ModeCount" ></a>ModeCount</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew31NL3D_1_1ITexturew4" doxytag="DonTKnow" ></a>DonTKnow</em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a05487.html#l00234">234</a> of file <a class="el" href="a05487.html">bitmap.h</a>. +<p> +<div class="fragment"><pre>00235 { +00236 <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>=0, +00237 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew14">Luminance</a>, +00238 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew0">Alpha</a>, +00239 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew1">AlphaLuminance</a>, +00240 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew6">DXTC1</a>, +00241 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew7">DXTC1Alpha</a>, +00242 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew8">DXTC3</a>, +00243 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew9">DXTC5</a>, +00244 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew5">DsDt</a>, +00245 <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew17">ModeCount</a>, +00246 <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew4">DonTKnow</a>=0xffffffff +00247 } <a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a>; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturew32" doxytag="NL3D::CTextureBump::TUploadFormat" ></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"> enum <a class="el" href="a03487.html#NL3D_1_1ITexturew32">NL3D::ITexture::TUploadFormat</a><code> [inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +<dl compact><dt><b>Enumeration values: </b></dt><dd> +<table border=0 cellspacing=2 cellpadding=0> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew2" doxytag="Auto" ></a>Auto</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew28" doxytag="RGBA8888" ></a>RGBA8888</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew26" doxytag="RGBA4444" ></a>RGBA4444</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew27" doxytag="RGBA5551" ></a>RGBA5551</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew24" doxytag="RGB888" ></a>RGB888</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew23" doxytag="RGB565" ></a>RGB565</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew6" doxytag="DXTC1" ></a>DXTC1</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew7" doxytag="DXTC1Alpha" ></a>DXTC1Alpha</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew8" doxytag="DXTC3" ></a>DXTC3</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew9" doxytag="DXTC5" ></a>DXTC5</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew14" doxytag="Luminance" ></a>Luminance</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew0" doxytag="Alpha" ></a>Alpha</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew1" doxytag="AlphaLuminance" ></a>AlphaLuminance</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew5" doxytag="DsDt" ></a>DsDt</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew32NL3D_1_1ITexturew34" doxytag="UploadFormatCount" ></a>UploadFormatCount</em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a06506.html#l00125">125</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +Referenced by <a class="el" href="a06506.html#l00212">NL3D::ITexture::getUploadFormat()</a>. +<p> +<div class="fragment"><pre>00126 { +00127 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew2">Auto</a>= 0, +00128 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew28">RGBA8888</a>, +00129 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew26">RGBA4444</a>, +00130 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew27">RGBA5551</a>, +00131 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew24">RGB888</a>, +00132 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew23">RGB565</a>, +00133 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew6">DXTC1</a>, +00134 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew7">DXTC1Alpha</a>, +00135 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew8">DXTC3</a>, +00136 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew9">DXTC5</a>, +00137 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew14">Luminance</a>, +00138 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew0">Alpha</a>, +00139 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew1">AlphaLuminance</a>, +00140 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew5">DsDt</a>, +00141 <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew34">UploadFormatCount</a> +00142 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturew33" doxytag="NL3D::CTextureBump::TWrapMode" ></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"> enum <a class="el" href="a03487.html#NL3D_1_1ITexturew33">NL3D::ITexture::TWrapMode</a><code> [inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +<dl compact><dt><b>Enumeration values: </b></dt><dd> +<table border=0 cellspacing=2 cellpadding=0> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew33NL3D_1_1ITexturew22" doxytag="Repeat" ></a>Repeat</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew33NL3D_1_1ITexturew3" doxytag="Clamp" ></a>Clamp</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1ITexturew33NL3D_1_1ITexturew35" doxytag="WrapModeCount" ></a>WrapModeCount</em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a06506.html#l00117">117</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +<div class="fragment"><pre>00118 { +00119 <a class="code" href="a03487.html#NL3D_1_1ITexturew33NL3D_1_1ITexturew22">Repeat</a>= 0, +00120 <a class="code" href="a03487.html#NL3D_1_1ITexturew33NL3D_1_1ITexturew3">Clamp</a>, +00121 +00122 <a class="code" href="a03487.html#NL3D_1_1ITexturew33NL3D_1_1ITexturew35">WrapModeCount</a> +00123 }; +</pre></div> </td> + </tr> +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NL3D_1_1CTextureBumpa7" doxytag="NL3D::CTextureBump::CTextureBump" ></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::CTextureBump::CTextureBump </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +ctor +<p> + +<p> +Definition at line <a class="el" href="a06511.html#l00221">221</a> of file <a class="el" href="a06511.html">texture_bump.cpp</a>. +<p> +<div class="fragment"><pre>00221 : <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp8">_NormalizationFactor</a>(NULL), +00222 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp1">_DisableSharing</a>(<span class="keyword">false</span>), +00223 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp11">_UseAbsoluteOffsets</a>(<span class="keyword">false</span>), +00224 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp2">_ForceNormalize</a>(<span class="keyword">true</span>), +00225 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp9">_Signed</a>(<span class="keyword">true</span>) +00226 { +00227 <span class="comment">// mipmapping not supported for now, disable it</span> +00228 ITexture::setFilterMode(ITexture::Linear, ITexture::LinearMipMapOff); +00229 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa64" doxytag="NL3D::CTextureBump::~CTextureBump" ></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::CTextureBump::~<a class="el" href="a03489.html">CTextureBump</a> </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +============================================================================================== +<p> + +<p> +Definition at line <a class="el" href="a06511.html#l00405">405</a> of file <a class="el" href="a06511.html">texture_bump.cpp</a>. +<p> +References <a class="el" href="a06511.html#l00034">_NameToNF</a>, <a class="el" href="a06512.html#l00117">_NameToNFHandle</a>, and <a class="el" href="a06512.html#l00104">_NormalizationFactor</a>. +<p> +<div class="fragment"><pre>00406 { +00407 <span class="keywordflow">if</span> (<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp8">_NormalizationFactor</a>) +00408 { +00409 --(<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp7">_NameToNFHandle</a>->second.NumRefs); +00410 <span class="keywordflow">if</span> (<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp7">_NameToNFHandle</a>->second.NumRefs == 0) +00411 { +00412 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpt0">_NameToNF</a>.erase(_NameToNFHandle); +00413 } +00414 } +00415 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NL3D_1_1ITexturea0" doxytag="NL3D::CTextureBump::allowDegradation" ></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"> virtual bool NL3D::ITexture::allowDegradation </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Does this texture allow the driver to degrade. +<p> + +<p> +Reimplemented in <a class="el" href="a03502.html#NL3D_1_1CTextureFilea0">NL3D::CTextureFile</a>, and <a class="el" href="a03511.html#NL3D_1_1CTextureMema0">NL3D::CTextureMem</a>. +<p> +Definition at line <a class="el" href="a06506.html#l00352">352</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +Referenced by <a class="el" href="a05652.html#l00099">NL3D::CDriverGL::getGlTextureFormat()</a>, <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>, and <a class="el" href="a05652.html#l00807">NL3D::CDriverGL::uploadTexture()</a>. +<p> +<div class="fragment"><pre>00352 { <span class="keywordflow">return</span> <span class="keyword">false</span>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea1" doxytag="NL3D::CTextureBump::blend" ></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 NLMISC::CBitmap::blend </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02268.html">CBitmap</a> & </td> + <td class="mdname" nowrap> <em>Bm0</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02268.html">CBitmap</a> & </td> + <td class="mdname" nowrap> <em>Bm1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a9">uint16</a> </td> + <td class="mdname" nowrap> <em>factor</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>inputBitmapIsMutable</em> = false</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set this bitmap as the result of the blend bewteen 2 bitmap REQUIRE : - Bm0 and Bm1 should have the same size.<ul> +<li>Both bitmap should be convertible to RGBA pixel format. The result is a RGBA bitmap. NB: this just works with the first mipmaps <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>factor</em> </td><td>The blend factor. 0 means the result is equal to Bm0, 256 means the result is equal to Bm1 </td></tr> + <tr><td valign=top><em>inputBitmapIsMutable</em> </td><td>when true, bitmap can be converted in place when needed (no copy done)</td></tr> + </table> +</dl> +</li></ul> + +<p> +Definition at line <a class="el" href="a05486.html#l02817">2817</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05487.html#l00090">NLMISC::CBitmap::_Data</a>, <a class="el" href="a05487.html#l00096">NLMISC::CBitmap::_Height</a>, <a class="el" href="a05487.html#l00095">NLMISC::CBitmap::_Width</a>, <a class="el" href="a05486.html#l00882">NLMISC::CBitmap::convertToRGBA()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a05486.html#l01545">NLMISC::CBitmap::resize()</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">NLMISC::CBitmap::RGBA</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05981.html#l00102">uint64</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +<div class="fragment"><pre>02818 { +02819 <a class="code" href="a04199.html#a6">nlassert</a>(factor <= 256); +02820 +02821 <a class="code" href="a04199.html#a6">nlassert</a>(Bm0.<a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a> != 0 && Bm0.<a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a> != 0 +02822 && Bm1.<a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a> != 0 && Bm1.<a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a> != 0); +02823 +02824 <a class="code" href="a04199.html#a6">nlassert</a>(Bm0.<a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a> == Bm1.<a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>); <span class="comment">// the bitmap should have the same size</span> +02825 <a class="code" href="a04199.html#a6">nlassert</a>(Bm0.<a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a> == Bm1.<a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>); +02826 +02827 <span class="keyword">const</span> <a class="code" href="a02268.html">CBitmap</a> *nBm0, *nBm1; <span class="comment">// pointer to the bitmap that is used for blending, or to a copy is a conversion wa required</span> +02828 +02829 <a class="code" href="a02268.html">CBitmap</a> cp0, cp1; <span class="comment">// these bitmap are copies of Bm1 and Bm0 if a conversion was needed</span> +02830 +02831 <span class="keywordflow">if</span> (Bm0.<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> != <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>) +02832 { +02833 <span class="keywordflow">if</span> (inputBitmapIsMutable) +02834 { +02835 Bm0.<a class="code" href="a02268.html#NLMISC_1_1CBitmapz1925_10">convertToRGBA</a>(); +02836 nBm0 = &Bm0; +02837 } +02838 <span class="keywordflow">else</span> +02839 { +02840 cp0 = Bm0; +02841 cp0.<a class="code" href="a02268.html#NLMISC_1_1CBitmapz1925_10">convertToRGBA</a>(); +02842 nBm0 = &cp0; +02843 } +02844 } +02845 <span class="keywordflow">else</span> +02846 { +02847 nBm0 = &Bm0; +02848 } +02849 +02850 +02851 <span class="keywordflow">if</span> (Bm1.<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> != <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>) +02852 { +02853 <span class="keywordflow">if</span> (inputBitmapIsMutable) +02854 { +02855 Bm1.<a class="code" href="a02268.html#NLMISC_1_1CBitmapz1925_10">convertToRGBA</a>(); +02856 nBm1 = &Bm1; +02857 } +02858 <span class="keywordflow">else</span> +02859 { +02860 cp1 = Bm1; +02861 cp1.<a class="code" href="a02268.html#NLMISC_1_1CBitmapz1925_10">convertToRGBA</a>(); +02862 nBm1 = &cp1; +02863 } +02864 } +02865 <span class="keywordflow">else</span> +02866 { +02867 nBm1 = &Bm1; +02868 } +02869 +02870 this-><a class="code" href="a02268.html#NL3D_1_1ITexturea33">resize</a>(Bm0.<a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>, Bm0.<a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>, RGBA); +02871 +02872 <a class="code" href="a04558.html#a15">uint</a> numPix = <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a> * <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>; <span class="comment">// 4 component per pixels</span> +02873 +02874 +02875 <span class="keyword">const</span> <a class="code" href="a04558.html#a7">uint8</a> *src0 = &(nBm0-><a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0][0]); +02876 <span class="keyword">const</span> <a class="code" href="a04558.html#a7">uint8</a> *src1 = &(nBm1-><a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0][0]); +02877 <a class="code" href="a04558.html#a7">uint8</a> *dest = &(this-><a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0][0]); +02878 +02879 +02880 <span class="preprocessor"> #ifdef NL_OS_WINDOWS </span> +02881 <span class="preprocessor"></span> <span class="keywordflow">if</span> (CSystemInfo::hasMMX()) +02882 { +02883 <span class="comment">// On a P4 2GHz, with a 256x256 texture, I got the following results :</span> +02884 <span class="comment">// without mmx : 5.2 ms</span> +02885 <span class="comment">// with mmx : 1.7 ms</span> +02886 <span class="comment">// I'm sure this can be further optimized..</span> +02887 +02888 <a class="code" href="a04558.html#a15">uint</a> numPixLeft = numPix & 1; <span class="comment">// process 2 pixels at once, so special case for odd number</span> +02889 numPix = numPix & ~1; +02890 <span class="comment">// do fast blend with mmx</span> +02891 <a class="code" href="a04558.html#a13">uint64</a> blendFactor0; +02892 <a class="code" href="a04558.html#a13">uint64</a> blendFactor1; +02893 <a class="code" href="a04558.html#a9">uint16</a> *bf0 = (<a class="code" href="a04558.html#a9">uint16</a> *) &blendFactor0; +02894 <a class="code" href="a04558.html#a9">uint16</a> *bf1 = (<a class="code" href="a04558.html#a9">uint16</a> *) &blendFactor1; +02895 bf0[0] = bf0[1] = bf0[2] = bf0[3] = factor; +02896 bf1[0] = bf1[1] = bf1[2] = bf1[3] = 256 - factor; +02897 __asm +02898 { +02899 mov esi, src0 +02900 mov eax, src1 +02901 mov edi, dest +02902 mov ebx, -8 +02903 mov ecx, numPix +02904 shr ecx, 1 <span class="comment">// process pixels 2 by 2</span> +02905 movq mm1, blendFactor0 +02906 movq mm0, blendFactor1 +02907 +02908 myLoop: +02909 pxor mm6, mm6 +02910 lea ebx, [ebx + 8] <span class="comment">// points next location</span> +02911 pxor mm7, mm7 +02912 movq mm2, [esi + ebx] +02913 movq mm3, [eax + ebx] +02914 <span class="comment">// do blend </span> +02915 punpckhbw mm7, mm2 <span class="comment">// mm7 contains src0 color 0 in high bytes</span> +02916 punpckhbw mm6, mm3 <span class="comment">// mm6 contains src1 color 0 in high bytes</span> +02917 psrl mm7, 1 +02918 pxor mm4, mm4 <span class="comment">// mm4 = 0 </span> +02919 psrl mm6, 1 +02920 pmulhw mm7, mm0 <span class="comment">// src0 = src0 * blendFactor</span> +02921 pxor mm5, mm5 <span class="comment">// mm5 = 0</span> +02922 pmulhw mm6, mm1 <span class="comment">// src1 = src1 * (1 - blendfactor)</span> +02923 punpcklbw mm4, mm2 <span class="comment">// mm4 contains src0 color 1 in high bytes</span> +02924 paddusw mm6, mm7 <span class="comment">// mm6 = src0[0] blended with src1[0]</span> +02925 psrl mm4, 1 +02926 punpcklbw mm5, mm3 <span class="comment">// mm4 contains src1 color 1 in high bytes</span> +02927 psll mm6, 1 +02928 psrl mm5, 1 +02929 pmulhw mm4, mm0 <span class="comment">// src0 = src0 * blendFactor</span> +02930 pmulhw mm5, mm1 <span class="comment">// src1 = src1 * (1 - blendfactor)</span> +02931 paddusw mm4, mm5 <span class="comment">// mm6 = src0[1] blended with src1[1]</span> +02932 psll mm4, 1 +02933 <span class="comment">// pack result</span> +02934 packuswb mm4, mm6 +02935 dec ecx +02936 movq [edi + ebx], mm4 <span class="comment">// store result</span> +02937 jne myLoop +02938 emms +02939 } +02940 <span class="keywordflow">if</span> (numPixLeft) +02941 { +02942 <span class="comment">// case of odd number of pixels</span> +02943 src0 += 4 * numPix; +02944 src1 += 4 * numPix; +02945 dest += 4 * numPix; +02946 <a class="code" href="a04558.html#a15">uint</a> blendFact = (<a class="code" href="a04558.html#a15">uint</a>) factor; +02947 <a class="code" href="a04558.html#a15">uint</a> invblendFact = 256 - blendFact; +02948 *dest = (<a class="code" href="a04558.html#a7">uint8</a>) (((blendFact * *src1) + (invblendFact * *src0)) >> 8); +02949 *(dest + 1) = (<a class="code" href="a04558.html#a7">uint8</a>) (((blendFact * *(src1 + 1)) + (invblendFact * *(src0 + 1))) >> 8); +02950 *(dest + 2) = (<a class="code" href="a04558.html#a7">uint8</a>) (((blendFact * *(src1 + 2)) + (invblendFact * *(src0 + 2))) >> 8); +02951 *(dest + 3) = (<a class="code" href="a04558.html#a7">uint8</a>) (((blendFact * *(src1 + 3)) + (invblendFact * *(src0 + 3))) >> 8); +02952 } +02953 } +02954 <span class="keywordflow">else</span> +02955 <span class="preprocessor"> #endif //#ifdef NL_OS_WINDOWS </span> +02956 <span class="preprocessor"></span> { +02957 <a class="code" href="a04558.html#a7">uint8</a> *endPix = dest + (numPix << 2); +02958 <span class="comment">// no mmx version</span> +02959 <a class="code" href="a04558.html#a15">uint</a> blendFact = (<a class="code" href="a04558.html#a15">uint</a>) factor; +02960 <a class="code" href="a04558.html#a15">uint</a> invblendFact = 256 - blendFact; +02961 <span class="keywordflow">do</span> +02962 { +02964 *dest = (<a class="code" href="a04558.html#a7">uint8</a>) (((blendFact * *src1) + (invblendFact * *src0)) >> 8); +02965 *(dest + 1) = (<a class="code" href="a04558.html#a7">uint8</a>) (((blendFact * *(src1 + 1)) + (invblendFact * *(src0 + 1))) >> 8); +02966 *(dest + 2) = (<a class="code" href="a04558.html#a7">uint8</a>) (((blendFact * *(src1 + 2)) + (invblendFact * *(src0 + 2))) >> 8); +02967 *(dest + 3) = (<a class="code" href="a04558.html#a7">uint8</a>) (((blendFact * *(src1 + 3)) + (invblendFact * *(src0 + 3))) >> 8); +02968 +02969 src0 = src0 + 4; +02970 src1 = src1 + 4; +02971 dest = dest + 4; +02972 } +02973 <span class="keywordflow">while</span> (dest != endPix); +02974 } +02975 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea2" doxytag="NL3D::CTextureBump::blit" ></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 NLMISC::CBitmap::blit </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02268.html">CBitmap</a> * </td> + <td class="mdname" nowrap> <em>src</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a10">sint32</a> </td> + <td class="mdname" nowrap> <em>x</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a10">sint32</a> </td> + <td class="mdname" nowrap> <em>y</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Perform a simple blit from the source to this bitmap at the (x, y) pos The dimension of the original bitmap are preserved For now, this texture and the source must have the same format With DXTC format, the dest coordinates must be a multiple of 4 mipmap are not rebuild when present <dl compact><dt><b>Returns:</b></dt><dd>true if the params were corrects and if the blit occures. In debug build there's an assertion</dd></dl> + +<p> +Definition at line <a class="el" href="a05486.html#l02332">2332</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05486.html#l00070">NLMISC::CBitmap::bitPerPixels</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew4">NLMISC::CBitmap::DonTKnow</a>, <a class="el" href="a05646.html#l01013">height</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a05646.html#l01124">src</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a05646.html#l01013">width</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>. +<p> +Referenced by <a class="el" href="a06525.html#l00178">NL3D::CTextureGrouped::doGenerate()</a>, and <a class="el" href="a05567.html#l00367">NL3D::CCoarseMeshBuild::expand()</a>. +<p> +<div class="fragment"><pre>02333 { +02334 +02335 <a class="code" href="a04199.html#a6">nlassert</a>(this->PixelFormat == <a class="code" href="a04223.html#a652">src</a>->PixelFormat); +02336 <span class="keywordflow">if</span> (this-><a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> != <a class="code" href="a04223.html#a652">src</a>->PixelFormat) +02337 { +02338 <span class="keywordflow">return</span> <span class="keyword">false</span>; +02339 } +02340 +02341 +02342 <span class="comment">// check for dxtc use</span> +02343 +02344 <span class="keyword">const</span> <span class="keywordtype">bool</span> useDXTC = <a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew6">DXTC1</a> || PixelFormat == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew7">DXTC1Alpha</a> || PixelFormat == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew8">DXTC3</a> || PixelFormat == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew9">DXTC5</a>; +02345 +02346 <span class="comment">// number of bits for a 4x4 pix block</span> +02347 <span class="keyword">const</span> <a class="code" href="a04558.html#a15">uint</a> dxtcNumBits = PixelFormat == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew6">DXTC1</a> || PixelFormat == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew7">DXTC1Alpha</a> ? 64 : 128; +02348 +02349 +02350 <span class="keywordflow">if</span> (useDXTC) +02351 { +02352 <span class="comment">// blit pos must be multiple of 4</span> +02353 +02354 <a class="code" href="a04199.html#a6">nlassert</a>(! (x & 3 || y & 3) ); +02355 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a572">x</a> & 3 || <a class="code" href="a04223.html#a573">y</a> & 3) <span class="keywordflow">return</span> <span class="keyword">false</span>; +02356 +02357 } +02358 +02359 <a class="code" href="a04199.html#a6">nlassert</a>(PixelFormat != DonTKnow); +02360 +02361 <span class="comment">// the width to copy</span> +02362 <a class="code" href="a04558.html#a14">sint</a> <a class="code" href="a04223.html#a632">width</a> = <a class="code" href="a04223.html#a652">src</a>->_Width; +02363 <span class="comment">// the height to copy</span> +02364 <a class="code" href="a04558.html#a14">sint</a> <a class="code" href="a04223.html#a633">height</a> = <a class="code" href="a04223.html#a652">src</a>->_Height; +02365 +02366 <a class="code" href="a04558.html#a15">uint</a> destStartX, destStartY; +02367 <a class="code" href="a04558.html#a15">uint</a> srcStartX, srcStartY; +02368 +02369 +02370 <span class="comment">// clip against left</span> +02371 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a572">x</a> < 0) +02372 { +02373 <a class="code" href="a04223.html#a632">width</a> += <a class="code" href="a04223.html#a572">x</a>; +02374 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a632">width</a> <= 0) <span class="keywordflow">return</span> <span class="keyword">true</span>; +02375 destStartX = 0; +02376 srcStartX = -<a class="code" href="a04223.html#a572">x</a>; +02377 } +02378 <span class="keywordflow">else</span> +02379 { +02380 destStartX = <a class="code" href="a04223.html#a572">x</a>; +02381 srcStartX = 0; +02382 } +02383 +02384 <span class="comment">// clip against top</span> +02385 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a573">y</a> < 0) +02386 { +02387 <a class="code" href="a04223.html#a633">height</a> += <a class="code" href="a04223.html#a573">y</a>; +02388 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a633">height</a> <= 0) <span class="keywordflow">return</span> <span class="keyword">true</span>; +02389 srcStartY = -<a class="code" href="a04223.html#a573">y</a>; +02390 destStartY = 0; +02391 } +02392 <span class="keywordflow">else</span> +02393 { +02394 destStartY = <a class="code" href="a04223.html#a573">y</a>; +02395 srcStartY = 0; +02396 } +02397 +02398 <span class="comment">// clip against right</span> +02399 <span class="keywordflow">if</span> ((destStartX + <a class="code" href="a04223.html#a632">width</a> - 1) >= <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>) +02400 { +02401 <a class="code" href="a04223.html#a632">width</a> = <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a> - destStartX; +02402 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a632">width</a> <= 0) <span class="keywordflow">return</span> <span class="keyword">true</span>; +02403 } +02404 +02405 <span class="comment">// clip against bottom</span> +02406 <span class="keywordflow">if</span> ((destStartY + <a class="code" href="a04223.html#a633">height</a> - 1) >= <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>) +02407 { +02408 <a class="code" href="a04223.html#a633">height</a> = <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a> - destStartY; +02409 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a632">width</a> <= 0) <span class="keywordflow">return</span> <span class="keyword">true</span>; +02410 } +02411 +02412 +02413 <span class="comment">// divide all distance by 4 when using DXTC</span> +02414 <span class="keywordflow">if</span> (useDXTC) +02415 { +02416 destStartX >>= 2; +02417 destStartY >>= 2; +02418 srcStartX >>= 2; +02419 srcStartY >>= 2; +02420 <a class="code" href="a04223.html#a632">width</a> >>= 2; +02421 <a class="code" href="a04223.html#a633">height</a> >>= 2; +02422 } +02423 +02424 +02425 <span class="comment">// bytes per pixs is for either one pixel or 16 (a 4x4 block in DXTC)</span> +02426 <span class="keyword">const</span> <a class="code" href="a04558.html#a15">uint</a> bytePerPixs = ( useDXTC ? dxtcNumBits : <a class="code" href="a02268.html#NL3D_1_1ITextures0">bitPerPixels</a>[PixelFormat] ) >> 3 <span class="comment">/* divide by 8 to get the number of bytes */</span>; +02427 +02428 +02429 <span class="keyword">const</span> <a class="code" href="a04558.html#a15">uint</a> destRealWidth = useDXTC ? (<a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a> >> 2) : <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>; +02430 <span class="keyword">const</span> <a class="code" href="a04558.html#a15">uint</a> srcRealWidth = useDXTC ? (<a class="code" href="a04223.html#a652">src</a>->_Width >> 2) : <a class="code" href="a04223.html#a652">src</a>->_Width; +02431 +02432 +02433 <span class="comment">// size to go to the next line in the destination</span> +02434 <span class="keyword">const</span> <a class="code" href="a04558.html#a15">uint</a> destStride = destRealWidth * bytePerPixs; +02435 +02436 <span class="comment">// size to go to the next line in the source</span> +02437 <span class="keyword">const</span> <a class="code" href="a04558.html#a15">uint</a> srcStride = srcRealWidth * bytePerPixs; +02438 +02439 <span class="comment">// length in bytes of a line to copy</span> +02440 <span class="keyword">const</span> <a class="code" href="a04558.html#a15">uint</a> lineLength = <a class="code" href="a04223.html#a632">width</a> * bytePerPixs; +02441 +02442 +02443 <a class="code" href="a04558.html#a7">uint8</a> *destPos = &(<a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0][0]) + destStride * destStartY + bytePerPixs * destStartX; +02444 <span class="keyword">const</span> <a class="code" href="a04558.html#a7">uint8</a> *srcPos = &(<a class="code" href="a04223.html#a652">src</a>->_Data[0][0]) + srcStride * srcStartY + bytePerPixs * srcStartX; +02445 +02446 <span class="comment">// copy each hline</span> +02447 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a14">sint</a> k = 0; k < <a class="code" href="a04223.html#a633">height</a>; ++k) +02448 { +02449 ::memcpy(destPos, srcPos, lineLength); +02450 destPos += destStride; +02451 srcPos += srcStride; +02452 } +02453 +02454 +02455 <span class="keywordflow">return</span> <span class="keyword">true</span>; +02456 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea3" doxytag="NL3D::CTextureBump::buildMipMaps" ></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 NLMISC::CBitmap::buildMipMaps </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> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Build the mipmaps of the bitmap if they don't exist. Work only in RGBA mode... <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a02268.html#NL3D_1_1ITexturea30">releaseMipMaps()</a>.</dd></dl> + +<p> +Definition at line <a class="el" href="a05486.html#l01422">1422</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05487.html#l00093">NLMISC::CBitmap::_MipMapCount</a>, <a class="el" href="a06340.html#l00340">NLMISC::CRGBA::A</a>, <a class="el" href="a06340.html#l00338">NLMISC::CRGBA::B</a>, <a class="el" href="a06340.html#l00336">NLMISC::CRGBA::G</a>, <a class="el" href="a05586.html#l00371">NLMISC::isPowerOf2()</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a06340.html#l00334">NLMISC::CRGBA::R</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector< uint8 >::resize()</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">NLMISC::CBitmap::RGBA</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05646.html#l00236">w</a>. +<p> +Referenced by <a class="el" href="a05790.html#l00152">NL3D::CHLSColorTexture::addMask()</a>, <a class="el" href="a06527.html#l00045">NL3D::CTextureMem::doGenerate()</a>, <a class="el" href="a05486.html#l02682">NLMISC::CBitmap::flipH()</a>, <a class="el" href="a05486.html#l02714">NLMISC::CBitmap::flipV()</a>, <a class="el" href="a05486.html#l01508">NLMISC::CBitmap::resample()</a>, <a class="el" href="a05486.html#l02781">NLMISC::CBitmap::rot90CCW()</a>, <a class="el" href="a05486.html#l02746">NLMISC::CBitmap::rot90CW()</a>, and <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>. +<p> +<div class="fragment"><pre>01423 { +01424 <a class="code" href="a04558.html#a11">uint32</a> i,j; +01425 +01426 <span class="keywordflow">if</span>(<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a>!=<a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>) <span class="keywordflow">return</span>; +01427 <span class="keywordflow">if</span>(<a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>!=1) <span class="keywordflow">return</span>; +01428 <span class="keywordflow">if</span>(!<a class="code" href="a05378.html#a264">NLMISC::isPowerOf2</a>(_Width)) <span class="keywordflow">return</span>; +01429 <span class="keywordflow">if</span>(!<a class="code" href="a05378.html#a264">NLMISC::isPowerOf2</a>(_Height)) <span class="keywordflow">return</span>; +01430 +01431 <a class="code" href="a04558.html#a11">uint32</a> <a class="code" href="a04223.html#a575">w</a> = <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>; +01432 <a class="code" href="a04558.html#a11">uint32</a> h = <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>; +01433 +01434 <span class="keywordflow">while</span>(<a class="code" href="a04223.html#a575">w</a>>1 || h>1) +01435 { +01436 <a class="code" href="a04558.html#a11">uint32</a> precw = <a class="code" href="a04223.html#a575">w</a>; +01437 <a class="code" href="a04558.html#a11">uint32</a> prech = h; +01438 <a class="code" href="a04223.html#a575">w</a> = (<a class="code" href="a04223.html#a575">w</a>+1)/2; +01439 h = (h+1)/2; +01440 <a class="code" href="a04558.html#a11">uint32</a> mulw= precw/<a class="code" href="a04223.html#a575">w</a>; +01441 <a class="code" href="a04558.html#a11">uint32</a> mulh= prech/h; +01442 +01443 <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[<a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>].resize(w*h*4); +01444 +01445 +01446 <a class="code" href="a03337.html">NLMISC::CRGBA</a> *pRgba = (<a class="code" href="a03337.html">NLMISC::CRGBA</a>*)&<a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[<a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>][0]; +01447 <a class="code" href="a03337.html">NLMISC::CRGBA</a> *pRgbaPrev = (<a class="code" href="a03337.html">NLMISC::CRGBA</a>*)&<a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[<a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>-1][0]; +01448 <span class="keywordflow">for</span>(i=0; i<h; i++) +01449 { +01450 <a class="code" href="a04558.html#a14">sint</a> i0= mulh*i; +01451 <a class="code" href="a04558.html#a14">sint</a> i1= mulh*i+1; +01452 <span class="keywordflow">if</span>(mulh==1) +01453 i1=i0; +01454 i0*=precw; +01455 i1*=precw; +01456 <span class="keywordflow">for</span>(j=0; j<<a class="code" href="a04223.html#a575">w</a>; j++) +01457 { +01458 <a class="code" href="a04558.html#a14">sint</a> j0= mulw*j; +01459 <a class="code" href="a04558.html#a14">sint</a> j1= mulw*j+1; +01460 <span class="keywordflow">if</span>(mulh==1) +01461 j1=j0; +01462 <a class="code" href="a03337.html">CRGBA</a> &c0= pRgbaPrev[i0+j0]; +01463 <a class="code" href="a03337.html">CRGBA</a> &c1= pRgbaPrev[i0+j1]; +01464 <a class="code" href="a03337.html">CRGBA</a> &c2= pRgbaPrev[i1+j0]; +01465 <a class="code" href="a03337.html">CRGBA</a> &c3= pRgbaPrev[i1+j1]; +01466 pRgba[i*<a class="code" href="a04223.html#a575">w</a> + j].<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a> = (c0.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a> + +01467 c1.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a> + +01468 c2.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a> + +01469 c3.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo3">R</a> + 2 ) /4; +01470 pRgba[i*<a class="code" href="a04223.html#a575">w</a> + j].<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a> = (c0.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a> + +01471 c1.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a> + +01472 c2.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a> + +01473 c3.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo2">G</a> + 2 ) /4; +01474 pRgba[i*<a class="code" href="a04223.html#a575">w</a> + j].<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a> = (c0.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a> + +01475 c1.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a> + +01476 c2.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a> + +01477 c3.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo1">B</a> + 2 ) /4; +01478 pRgba[i*<a class="code" href="a04223.html#a575">w</a> + j].<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a> = (c0.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a> + +01479 c1.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a> + +01480 c2.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a> + +01481 c3.<a class="code" href="a03337.html#NLMISC_1_1CRGBAo0">A</a> + 2 ) /4; +01482 } +01483 } +01484 +01485 <a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>++; +01486 } +01487 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea4" doxytag="NL3D::CTextureBump::buildNonSelectableVersion" ></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"> virtual <a class="el" href="a03487.html">ITexture</a>* NL3D::ITexture::buildNonSelectableVersion </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>index</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +If this texture is selectable, build a non selectable version of this texture that is setupped with the given slot. NB : If this texture is selectable, you are ensured that the return pointer is not 'this' +<p> +Reimplemented in <a class="el" href="a03492.html#NL3D_1_1CTextureCubea4">NL3D::CTextureCube</a>, and <a class="el" href="a03512.html#NL3D_1_1CTextureMultiFilea4">NL3D::CTextureMultiFile</a>. +<p> +Definition at line <a class="el" href="a06506.html#l00368">368</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a05646.html#l00225">index</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05993.html#l00268">NL3D::CMeshBaseInstance::selectTextureSet()</a>. +<p> +<div class="fragment"><pre>00368 { <span class="keywordflow">return</span> <span class="keyword">this</span>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea5" doxytag="NL3D::CTextureBump::clearTouched" ></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::ITexture::clearTouched </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">void </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06506.html#l00448">448</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00422">NL3D::ITexture::_ListInvalidRect</a>. +<p> +Referenced by <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>. +<p> +<div class="fragment"><pre>00449 { +00450 <a class="code" href="a03487.html#NL3D_1_1ITexturep4">_Touched</a>=<span class="keyword">false</span>; +00451 <a class="code" href="a03487.html#NL3D_1_1ITextureo0">_ListInvalidRect</a>.clear(); +00452 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea6" doxytag="NL3D::CTextureBump::convertToType" ></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 NLMISC::CBitmap::convertToType </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02268.html#NL3D_1_1ITexturew31">TType</a> </td> + <td class="mdname1" valign="top" nowrap> <em>type</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Convert bitmap to another type conversion to rgba always work. No-op if already rgba. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>type</em> </td><td>new type for the bitmap </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>true if conversion succeeded, false else</dd></dl> + +<p> +Definition at line <a class="el" href="a05486.html#l00926">926</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05486.html#l00821">NLMISC::CBitmap::convertToAlpha()</a>, <a class="el" href="a05486.html#l00852">NLMISC::CBitmap::convertToAlphaLuminance()</a>, <a class="el" href="a05486.html#l00415">NLMISC::CBitmap::convertToDXTC5()</a>, <a class="el" href="a05486.html#l00790">NLMISC::CBitmap::convertToLuminance()</a>, <a class="el" href="a05486.html#l00882">NLMISC::CBitmap::convertToRGBA()</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">NLMISC::CBitmap::RGBA</a>, and <a class="el" href="a05646.html#l00244">type</a>. +<p> +Referenced by <a class="el" href="a05790.html#l00152">NL3D::CHLSColorTexture::addMask()</a>, <a class="el" href="a05935.html#l00809">NL3D::CLodCharacterTmpBitmap::build()</a>, <a class="el" href="a05567.html#l00070">NL3D::CCoarseMeshBuild::buildBitmap()</a>, <a class="el" href="a06521.html#l00041">NL3D::CTextureFile::buildBitmapFromFile()</a>, <a class="el" href="a05785.html#l00049">NL3D::CHeightMap::buildFromBitmap()</a>, <a class="el" href="a05463.html#l00059">NL3D::CAsyncTextureManager::CTextureEntry::createCoarseBitmap()</a>, <a class="el" href="a06768.html#l01820">NL3D::CZoneLighter::getTexture()</a>, <a class="el" href="a06536.html#l00442">NL3D::CTileBank::getTileNoiseMap()</a>, and <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>. +<p> +<div class="fragment"><pre>00927 { +00928 <span class="keywordflow">if</span>(<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a>==<a class="code" href="a04223.html#a581">type</a>) <span class="keywordflow">return</span> <span class="keyword">true</span>; +00929 +00930 <span class="keywordflow">switch</span>(<a class="code" href="a04223.html#a581">type</a>) +00931 { +00932 <span class="keywordflow">case</span> <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a> : +00933 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NLMISC_1_1CBitmapz1925_10">convertToRGBA</a>(); +00934 <span class="keywordflow">break</span>; +00935 +00936 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew9">DXTC5</a> : +00937 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NLMISC_1_1CBitmapz1925_8">convertToDXTC5</a>(); +00938 <span class="keywordflow">break</span>; +00939 +00940 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew14">Luminance</a> : +00941 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NLMISC_1_1CBitmapz1925_9">convertToLuminance</a>(); +00942 <span class="keywordflow">break</span>; +00943 +00944 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew0">Alpha</a> : +00945 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NLMISC_1_1CBitmapz1925_6">convertToAlpha</a>(); +00946 <span class="keywordflow">break</span>; +00947 +00948 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew1">AlphaLuminance</a> : +00949 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NLMISC_1_1CBitmapz1925_7">convertToAlphaLuminance</a>(); +00950 <span class="keywordflow">break</span>; +00951 +00952 <span class="keywordflow">default</span>: +00953 <span class="keywordflow">break</span>; +00954 } +00955 +00956 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00957 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpb0" doxytag="NL3D::CTextureBump::doGenerate" ></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::CTextureBump::doGenerate </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>async</em> = false </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [protected, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +============================================================================================== +<p> + +<p> +Implements <a class="el" href="a03487.html#NL3D_1_1ITextureb0">NL3D::ITexture</a>. +<p> +Definition at line <a class="el" href="a06511.html#l00277">277</a> of file <a class="el" href="a06511.html">texture_bump.cpp</a>. +<p> +References <a class="el" href="a06512.html#l00103">_HeightMap</a>, <a class="el" href="a06511.html#l00034">_NameToNF</a>, <a class="el" href="a06512.html#l00117">_NameToNFHandle</a>, <a class="el" href="a06512.html#l00104">_NormalizationFactor</a>, <a class="el" href="a06512.html#l00108">_Signed</a>, <a class="el" href="a06512.html#l00106">_UseAbsoluteOffsets</a>, <a class="el" href="a06511.html#l00039">NL3D::BuildDsDt()</a>, <a class="el" href="a06511.html#l00082">NL3D::BuildDsDtAsRGBA()</a>, <a class="el" href="a05487.html#l00308">NLMISC::CBitmap::getPixels()</a>, <a class="el" href="a06511.html#l00375">getShareName()</a>, <a class="el" href="a06506.html#l00212">NL3D::ITexture::getUploadFormat()</a>, <a class="el" href="a05646.html#l01013">height</a>, <a class="el" href="a05486.html#l00184">NLMISC::CBitmap::makeDummy()</a>, <a class="el" href="a06512.html#l00113">NL3D::CTextureBump::CNormalizationInfo::NormalizationFactor</a>, <a class="el" href="a06511.html#l00099">NL3D::NormalizeDsDt()</a>, <a class="el" href="a06511.html#l00182">NL3D::NormalizeDsDtAsRGBA()</a>, <a class="el" href="a06512.html#l00112">NL3D::CTextureBump::CNormalizationInfo::NumRefs</a>, <a class="el" href="a05486.html#l01493">NLMISC::CBitmap::releaseMipMaps()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05646.html#l01013">width</a>. +<p> +Referenced by <a class="el" href="a06511.html#l00382">getNormalizationFactor()</a>. +<p> +<div class="fragment"><pre>00278 { +00279 <span class="keywordflow">if</span> (!<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>) +00280 { +00281 <a class="code" href="a02268.html#NL3D_1_1ITexturea27">makeDummy</a>(); +00282 <span class="keywordflow">return</span>; +00283 } +00284 <span class="comment">// generate the height map</span> +00285 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->generate(); +00286 <span class="keywordflow">if</span> (!<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->convertToType(CBitmap::RGBA)) +00287 { +00288 <a class="code" href="a02268.html#NL3D_1_1ITexturea27">makeDummy</a>(); +00289 <span class="keywordflow">return</span>; +00290 } +00291 <a class="code" href="a02268.html#NL3D_1_1ITexturea30">releaseMipMaps</a>(); +00292 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a632">width</a> = <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->getWidth(); +00293 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a633">height</a> = <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->getHeight(); +00294 <span class="keywordflow">if</span> (<a class="code" href="a03487.html#NL3D_1_1ITexturez981_2">getUploadFormat</a>() == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew28">RGBA8888</a>) +00295 { +00296 <a class="code" href="a02268.html#NL3D_1_1ITexturea33">CBitmap::resize</a>(<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->getWidth(), <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->getHeight(), CBitmap::RGBA); +00297 } +00298 <span class="keywordflow">else</span> +00299 { +00300 <a class="code" href="a02268.html#NL3D_1_1ITexturea33">CBitmap::resize</a>(<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->getWidth(), <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->getHeight(), CBitmap::DsDt); +00301 } +00302 <span class="comment">// build the DsDt map</span> +00303 <span class="keywordflow">if</span> (<a class="code" href="a03487.html#NL3D_1_1ITexturez981_2">getUploadFormat</a>() == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew28">RGBA8888</a>) +00304 { +00305 <a class="code" href="a05363.html#a533">BuildDsDtAsRGBA</a>((<a class="code" href="a04558.html#a11">uint32</a> *) &(<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->getPixels()[0]), <a class="code" href="a04223.html#a632">width</a>, <a class="code" href="a04223.html#a633">height</a>, (<a class="code" href="a04558.html#a11">uint32</a> *) &(<a class="code" href="a02268.html#NL3D_1_1ITexturez1927_1">getPixels</a>()[0]), <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp11">_UseAbsoluteOffsets</a>); +00306 } +00307 <span class="keywordflow">else</span> +00308 { +00309 <a class="code" href="a05363.html#a532">BuildDsDt</a>((<a class="code" href="a04558.html#a11">uint32</a> *) &(<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->getPixels()[0]), <a class="code" href="a04223.html#a632">width</a>, <a class="code" href="a04223.html#a633">height</a>, (<a class="code" href="a04558.html#a9">uint16</a> *) &(<a class="code" href="a02268.html#NL3D_1_1ITexturez1927_1">getPixels</a>()[0]), <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp11">_UseAbsoluteOffsets</a>, <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp9">_Signed</a>); +00310 } +00311 +00312 <span class="keywordtype">float</span> normalizationFactor; +00313 <span class="comment">// Normalize the map if needed</span> +00314 <span class="keywordflow">if</span> (<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp2">_ForceNormalize</a>) +00315 { +00316 <span class="keywordflow">if</span> (<a class="code" href="a03487.html#NL3D_1_1ITexturez981_2">getUploadFormat</a>() == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew28">RGBA8888</a>) +00317 { +00318 normalizationFactor = <a class="code" href="a05363.html#a535">NormalizeDsDtAsRGBA</a>((<a class="code" href="a04558.html#a11">uint32</a> *) &(<a class="code" href="a02268.html#NL3D_1_1ITexturez1927_1">getPixels</a>()[0]), width, height, _UseAbsoluteOffsets); +00319 } +00320 <span class="keywordflow">else</span> +00321 { +00322 normalizationFactor = <a class="code" href="a05363.html#a534">NormalizeDsDt</a>((<a class="code" href="a04558.html#a9">uint16</a> *) &(<a class="code" href="a02268.html#NL3D_1_1ITexturez1927_1">getPixels</a>()[0]), width, height, _UseAbsoluteOffsets, _Signed); +00323 } +00324 } +00325 +00326 <span class="comment">// create entry in the map for the normalization factor</span> +00327 std::string shareName = <a class="code" href="a03489.html#NL3D_1_1CTextureBumpa25">getShareName</a>(); +00328 TNameToNI::iterator it = <a class="code" href="a03489.html#NL3D_1_1CTextureBumpt0">_NameToNF</a>.find(shareName); +00329 <span class="keywordflow">if</span> (it == <a class="code" href="a03489.html#NL3D_1_1CTextureBumpt0">_NameToNF</a>.end()) +00330 { +00331 <span class="comment">// create a new entry</span> +00332 CNormalizationInfo ni; +00333 ni.NumRefs = 1; +00334 ni.NormalizationFactor = normalizationFactor; +00335 std::pair<TNameToNI::iterator, bool> pb = <a class="code" href="a03489.html#NL3D_1_1CTextureBumpt0">_NameToNF</a>.insert(TNameToNI::value_type(shareName, ni)); +00336 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp8">_NormalizationFactor</a> = &(pb.first->second.NormalizationFactor); +00337 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp7">_NameToNFHandle</a> = pb.first; +00338 } +00339 <span class="keywordflow">else</span> +00340 { +00341 <span class="comment">// another map has computed the factor</span> +00342 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp8">_NormalizationFactor</a> = &(it->second.NormalizationFactor); +00343 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp7">_NameToNFHandle</a> = it; +00344 ++(it->second.NumRefs); +00345 } +00346 +00347 <span class="keywordflow">if</span> (<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->getReleasable()) +00348 { +00349 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->release(); +00350 } +00351 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa8" doxytag="NL3D::CTextureBump::enableSharing" ></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::CTextureBump::enableSharing </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>enabled</em> = true </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> + +<p> +Definition at line <a class="el" href="a06512.html#l00065">65</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +References <a class="el" href="a06512.html#l00105">_DisableSharing</a>. +<p> +<div class="fragment"><pre>00065 { <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp1">_DisableSharing</a> = !enabled; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea7" doxytag="NL3D::CTextureBump::flipH" ></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 NLMISC::CBitmap::flipH </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> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Horizontal flip (all the columns are flipped) +<p> +Definition at line <a class="el" href="a05486.html#l02682">2682</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05487.html#l00093">NLMISC::CBitmap::_MipMapCount</a>, <a class="el" href="a05486.html#l01422">NLMISC::CBitmap::buildMipMaps()</a>, <a class="el" href="a05486.html#l01388">NLMISC::CBitmap::getHeight()</a>, <a class="el" href="a05486.html#l01363">NLMISC::CBitmap::getWidth()</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a05486.html#l01493">NLMISC::CBitmap::releaseMipMaps()</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">NLMISC::CBitmap::RGBA</a>, and <a class="el" href="a05981.html#l00099">sint32</a>. +<p> +<div class="fragment"><pre>02683 { +02684 <span class="keywordflow">if</span> (<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> != <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>) +02685 <span class="keywordflow">return</span>; +02686 +02687 <a class="code" href="a04558.html#a10">sint32</a> nWidth = <a class="code" href="a02268.html#NL3D_1_1ITexturea20">getWidth</a>(0); +02688 <a class="code" href="a04558.html#a10">sint32</a> nHeight = <a class="code" href="a02268.html#NL3D_1_1ITexturea12">getHeight</a>(0); +02689 <a class="code" href="a04558.html#a10">sint32</a> i, j; +02690 <a class="code" href="a03337.html">NLMISC::CRGBA</a> *pBitmap = (<a class="code" href="a03337.html">NLMISC::CRGBA</a>*)&<a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0][0]; +02691 <span class="keywordtype">bool</span> needRebuild = <span class="keyword">false</span>; +02692 <a class="code" href="a03337.html">CRGBA</a> temp; +02693 +02694 <span class="keywordflow">if</span>(<a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>>1) +02695 needRebuild = <span class="keyword">true</span>; +02696 <a class="code" href="a02268.html#NL3D_1_1ITexturea30">releaseMipMaps</a>(); +02697 +02698 <span class="keywordflow">for</span>( i = 0; i < nHeight; ++i ) +02699 <span class="keywordflow">for</span>( j = 0; j < nWidth/2; ++j ) +02700 { +02701 temp = pBitmap[i*nWidth+j]; +02702 pBitmap[i*nWidth+j] = pBitmap[i*nWidth+nWidth-j-1]; +02703 pBitmap[i*nWidth+nWidth-j-1] = temp; +02704 } +02705 +02706 <span class="comment">// Rebuilding mipmaps</span> +02707 <span class="keywordflow">if</span>(needRebuild) +02708 { +02709 <a class="code" href="a02268.html#NL3D_1_1ITexturea3">buildMipMaps</a>(); +02710 } +02711 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea8" doxytag="NL3D::CTextureBump::flipV" ></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 NLMISC::CBitmap::flipV </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> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Vertical flip (all the rows are flipped) +<p> +Definition at line <a class="el" href="a05486.html#l02714">2714</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05487.html#l00093">NLMISC::CBitmap::_MipMapCount</a>, <a class="el" href="a05486.html#l01422">NLMISC::CBitmap::buildMipMaps()</a>, <a class="el" href="a05486.html#l01388">NLMISC::CBitmap::getHeight()</a>, <a class="el" href="a05486.html#l01363">NLMISC::CBitmap::getWidth()</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a05486.html#l01493">NLMISC::CBitmap::releaseMipMaps()</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">NLMISC::CBitmap::RGBA</a>, and <a class="el" href="a05981.html#l00099">sint32</a>. +<p> +<div class="fragment"><pre>02715 { +02716 <span class="keywordflow">if</span> (<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> != <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>) +02717 <span class="keywordflow">return</span>; +02718 +02719 <a class="code" href="a04558.html#a10">sint32</a> nWidth = <a class="code" href="a02268.html#NL3D_1_1ITexturea20">getWidth</a>(0); +02720 <a class="code" href="a04558.html#a10">sint32</a> nHeight = <a class="code" href="a02268.html#NL3D_1_1ITexturea12">getHeight</a>(0); +02721 <a class="code" href="a04558.html#a10">sint32</a> i, j; +02722 <a class="code" href="a03337.html">NLMISC::CRGBA</a> *pBitmap = (<a class="code" href="a03337.html">NLMISC::CRGBA</a>*)&<a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0][0]; +02723 <span class="keywordtype">bool</span> needRebuild = <span class="keyword">false</span>; +02724 <a class="code" href="a03337.html">CRGBA</a> temp; +02725 +02726 <span class="keywordflow">if</span>(<a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>>1) +02727 needRebuild = <span class="keyword">true</span>; +02728 <a class="code" href="a02268.html#NL3D_1_1ITexturea30">releaseMipMaps</a>(); +02729 +02730 <span class="keywordflow">for</span>( j = 0; j < nHeight/2; ++j ) +02731 <span class="keywordflow">for</span>( i = 0; i < nWidth; ++i ) +02732 { +02733 temp = pBitmap[j*nWidth+i]; +02734 pBitmap[j*nWidth+i] = pBitmap[(nHeight-j-1)*nWidth+i]; +02735 pBitmap[(nHeight-j-1)*nWidth+i] = temp; +02736 } +02737 +02738 <span class="comment">// Rebuilding mipmaps</span> +02739 <span class="keywordflow">if</span>(needRebuild) +02740 { +02741 <a class="code" href="a02268.html#NL3D_1_1ITexturea3">buildMipMaps</a>(); +02742 } +02743 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa11" doxytag="NL3D::CTextureBump::forceNormalize" ></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::CTextureBump::forceNormalize </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>force</em> = true </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> +Force normalization of this texture when it is generated, so that the deltas reach their maximum amplitude. After the texture generation, the factor needed to normalize can be obtained +<p> +Definition at line <a class="el" href="a06512.html#l00076">76</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +<div class="fragment"><pre>00076 { <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp2">_ForceNormalize</a> = force; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea9" doxytag="NL3D::CTextureBump::generate" ></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::ITexture::generate </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>async</em> = false </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Generate the texture pixels.<p> +This method is called by the driver when it needs to generate pixels of the texture. If the texture is used for the first time or if it is touched, the driver will call this method. For exemple, a texture file will load the bitmap in this method.<p> +If the invalidate rect list is empty, <a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a> rebuild all the texture. If the invalidate rect list is not empty, <a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a> rebuilds only the invalidate rectangles in the list.<p> +Don't clear the touch flag or the invalid rectangle list until updating the texture in <a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a>. It's the <a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a>'s caller jobs.<p> +After generation, if the texture is releasable, the driver will release the texture by calling <a class="el" href="a03487.html#NL3D_1_1ITexturea28">release()</a>.<p> +NB: a flag is maintained to see if the generated bitmap is coherent with texture description (see touch*()). So if you do {<a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a>; <a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a>;}, you only get 1 real bitmap generation...<p> +If, after the doGenerate, the bitmap format is compressed (DXTC) and no mipmaps have been generated, the mipmap are disabled beacause the user probably don't want the driver to unpacks the texture, generates the mipmaps and repacks the dxtc texture (that takes a lot of CPU time).<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>async</em> </td><td>tells the texture if the call is made asynchronously or not.</td></tr> + </table> +</dl> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03487.html#NL3D_1_1ITexturea21">isAllInvalidated()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea44">touch()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea45">touched()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea46">touchRect()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea5">clearTouched()</a>, <a class="el" href="a03487.html#NL3D_1_1ITextureo0">_ListInvalidRect</a> <p> +<a class="el" href="a03487.html#NL3D_1_1ITexturea17">getReleasable()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea41">setReleasable()</a></dd></dl> + +<p> +Definition at line <a class="el" href="a06506.html#l00309">309</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00404">NL3D::ITexture::_GoodGenerate</a>, and <a class="el" href="a03487.html#NL3D_1_1ITextureb0">NL3D::ITexture::doGenerate()</a>. +<p> +Referenced by <a class="el" href="a06372.html#l00957">NL3D::CShadowMapManager::allocateTexture()</a>, <a class="el" href="a05567.html#l00070">NL3D::CCoarseMeshBuild::buildBitmap()</a>, <a class="el" href="a06513.html#l00066">NL3D::CTextureCube::doGenerate()</a>, <a class="el" href="a06768.html#l01820">NL3D::CZoneLighter::getTexture()</a>, <a class="el" href="a06525.html#l00039">NL3D::GetTextureSize()</a>, <a class="el" href="a06536.html#l00442">NL3D::CTileBank::getTileNoiseMap()</a>, <a class="el" href="a06768.html#l02927">NL3D::CZoneLighter::lightWater()</a>, <a class="el" href="a05457.html#l00461">NL3D::CAsyncFileManager3D::CTextureLoad::run()</a>, <a class="el" href="a05457.html#l00231">NL3D::CAsyncFileManager3D::CMeshLoad::run()</a>, <a class="el" href="a06257.html#l00733">NL3D::CPSMultiTexturedParticle::setupMaterial()</a>, and <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>. +<p> +<div class="fragment"><pre>00310 { +00311 <span class="keywordflow">if</span>(!_GoodGenerate) +00312 { +00313 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpb0">doGenerate</a>(async); +00314 _GoodGenerate=<span class="keyword">true</span>; +00315 } +00316 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa13" doxytag="NL3D::CTextureBump::getAbsoluteOffsets" ></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 NL3D::CTextureBump::getAbsoluteOffsets </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06512.html#l00071">71</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +References <a class="el" href="a06512.html#l00106">_UseAbsoluteOffsets</a>. +<p> +<div class="fragment"><pre>00071 { <span class="keywordflow">return</span> <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp11">_UseAbsoluteOffsets</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITrackKeyFramer_3_01CKeyVector_01_4a6" doxytag="NL3D::CTextureBump::getClassName" ></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"> virtual std::string NLMISC::IClassable::getClassName </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> [pure virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Implemented in <a class="el" href="a02995.html#NLAIAGENT_1_1CNumericIndexz1699_0">NLAIAGENT::CNumericIndex</a>, <a class="el" href="a02145.html#NLAIAGENT_1_1VectorTypez1764_0">NLAIC::IPointerGestion</a>, <a class="el" href="a02650.html#NLAIC_1_1CIdentTypez1766_0">NLAIC::CIdentType</a>, and <a class="el" href="a02241.html#CAutomataDescz1896_0">CAutomataDesc</a>. +<p> +Referenced by <a class="el" href="a05549.html#l00091">NLMISC::CClassRegistry::checkObject()</a>, and <a class="el" href="a06525.html#l00039">NL3D::GetTextureSize()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea11" doxytag="NL3D::CTextureBump::getColor" ></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="a03338.html">CRGBAF</a> NLMISC::CBitmap::getColor </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">float </td> + <td class="mdname" nowrap> <em>x</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>y</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the color in the bitmap given a pixel size The mipmaps must be built. If not just return the bilinear at the given point. The input x and y must be clamped between 0 and 1 +<p> +Definition at line <a class="el" href="a05486.html#l02470">2470</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a06340.html#l00661">NLMISC::CRGBAF::A</a>, <a class="el" href="a06340.html#l00659">NLMISC::CRGBAF::B</a>, <a class="el" href="a06340.html#l00657">NLMISC::CRGBAF::G</a>, <a class="el" href="a05486.html#l02459">NLMISC::CBitmap::getColorInterp()</a>, <a class="el" href="a05486.html#l01388">NLMISC::CBitmap::getHeight()</a>, <a class="el" href="a05486.html#l03134">NLMISC::CBitmap::getPixelColor()</a>, <a class="el" href="a05487.html#l00308">NLMISC::CBitmap::getPixels()</a>, <a class="el" href="a05486.html#l01363">NLMISC::CBitmap::getWidth()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a06340.html#l00655">NLMISC::CRGBAF::R</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">NLMISC::CBitmap::RGBA</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>. +<p> +<div class="fragment"><pre>02471 { +02472 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a572">x</a> < 0.0f) <a class="code" href="a04223.html#a572">x</a> = 0.0f; +02473 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a572">x</a> > 1.0f) <a class="code" href="a04223.html#a572">x</a> = 1.0f; +02474 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a573">y</a> < 0.0f) <a class="code" href="a04223.html#a573">y</a> = 0.0f; +02475 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a573">y</a> > 1.0f) <a class="code" href="a04223.html#a573">y</a> = 1.0f; +02476 +02477 <a class="code" href="a04558.html#a10">sint32</a> nWidth = <a class="code" href="a02268.html#NL3D_1_1ITexturea20">getWidth</a>(0); +02478 <a class="code" href="a04558.html#a10">sint32</a> nHeight = <a class="code" href="a02268.html#NL3D_1_1ITexturea12">getHeight</a>(0); +02479 +02480 <span class="keywordflow">if</span> (nWidth == 0 || nHeight == 0) <span class="keywordflow">return</span> CRGBAF(0, 0, 0, 0); +02481 +02482 <span class="keyword">const</span> CObjectVector<uint8> &rBitmap = <a class="code" href="a02268.html#NL3D_1_1ITexturez1927_1">getPixels</a>(0); +02483 <a class="code" href="a04558.html#a10">sint32</a> nX[4], nY[4]; +02484 +02485 <a class="code" href="a04223.html#a572">x</a> *= nWidth-1; +02486 <a class="code" href="a04223.html#a573">y</a> *= nHeight-1; +02487 +02488 <span class="comment">// Integer part of (x,y)</span> +02489 <span class="comment">//nX[0] = ((sint32)floor(x-0.5f));</span> +02490 <span class="comment">//nY[0] = ((sint32)floor(y-0.5f));</span> +02491 nX[0] = ((<a class="code" href="a04558.html#a10">sint32</a>)floor(x)); +02492 nY[0] = ((<a class="code" href="a04558.html#a10">sint32</a>)floor(y)); +02493 +02494 nX[1] = (nX[0] < (nWidth-1) ? nX[0]+1 : nX[0]); +02495 nY[1] = nY[0]; +02496 +02497 nX[2] = nX[0]; +02498 nY[2] = (nY[0] < (nHeight-1) ? nY[0]+1 : nY[0]); +02499 +02500 nX[3] = nX[1]; +02501 nY[3] = nY[2]; +02502 +02503 <a class="code" href="a04558.html#a11">uint32</a> i; +02504 +02505 <span class="keywordflow">for</span> (i = 0; i < 4; ++i) +02506 { +02507 <a class="code" href="a04199.html#a6">nlassert</a> (nX[i] >= 0); +02508 <a class="code" href="a04199.html#a6">nlassert</a> (nY[i] >= 0 ); +02509 <a class="code" href="a04199.html#a6">nlassert</a> (nX[i] < nWidth); +02510 <a class="code" href="a04199.html#a6">nlassert</a> (nY[i] < nHeight); +02511 } +02512 +02513 <span class="comment">// Decimal part of (x,y)</span> +02514 <a class="code" href="a04223.html#a572">x</a> = <a class="code" href="a04223.html#a572">x</a> - (<span class="keywordtype">float</span>)nX[0]; +02515 <a class="code" href="a04223.html#a573">y</a> = <a class="code" href="a04223.html#a573">y</a> - (<span class="keywordtype">float</span>)nY[0]; +02516 +02517 <span class="keywordflow">switch</span> (this-><a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a>) +02518 { +02519 <span class="keywordflow">case</span> <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>: +02520 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew6">DXTC1</a>: +02521 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew7">DXTC1Alpha</a>: +02522 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew8">DXTC3</a>: +02523 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew9">DXTC5</a>: +02524 { +02525 CRGBAF finalVal; +02526 <a class="code" href="a03337.html">CRGBA</a> val[4]; +02527 +02528 <span class="keywordflow">if</span> (this-><a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> == <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>) +02529 { +02530 <span class="keywordflow">for</span> (i = 0; i < 4; ++i) +02531 { +02532 val[i] = <a class="code" href="a03337.html">CRGBA</a> (rBitmap[(nX[i]+nY[i]*nWidth)*4+0], +02533 rBitmap[(nX[i]+nY[i]*nWidth)*4+1], +02534 rBitmap[(nX[i]+nY[i]*nWidth)*4+2], +02535 rBitmap[(nX[i]+nY[i]*nWidth)*4+3]); +02536 } +02537 } +02538 <span class="keywordflow">else</span> +02539 { +02540 <span class="comment">// slower version : get from DXT</span> +02541 <span class="keywordflow">for</span> (i = 0; i < 4; ++i) +02542 { +02543 val[i] = <a class="code" href="a02268.html#NL3D_1_1ITexturea14">getPixelColor</a>(nX[i], nY[i]); +02544 } +02545 } +02546 +02547 finalVal.R = <a class="code" href="a02268.html#NLMISC_1_1CBitmapd4">getColorInterp</a> (x, y, val[0].R, val[1].R, val[2].R, val[3].R); +02548 finalVal.G = <a class="code" href="a02268.html#NLMISC_1_1CBitmapd4">getColorInterp</a> (x, y, val[0].G, val[1].G, val[2].G, val[3].G); +02549 finalVal.B = <a class="code" href="a02268.html#NLMISC_1_1CBitmapd4">getColorInterp</a> (x, y, val[0].B, val[1].B, val[2].B, val[3].B); +02550 finalVal.A = <a class="code" href="a02268.html#NLMISC_1_1CBitmapd4">getColorInterp</a> (x, y, val[0].A, val[1].A, val[2].A, val[3].A); +02551 finalVal /= 255.f; +02552 +02553 <span class="keywordflow">return</span> finalVal; +02554 } +02555 <span class="keywordflow">break</span>; +02556 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew0">Alpha</a>: +02557 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew14">Luminance</a>: +02558 { +02559 +02560 <span class="keywordtype">float</span> finalVal; +02561 <span class="keywordtype">float</span> val[4]; +02562 +02563 <span class="keywordflow">for</span> (i = 0; i < 4; ++i) +02564 val[i] = rBitmap[(nX[i]+nY[i]*nWidth)]; +02565 +02566 finalVal = <a class="code" href="a02268.html#NLMISC_1_1CBitmapd4">getColorInterp</a> (x, y, val[0], val[1], val[2], val[3]); +02567 finalVal /= 255.f; +02568 +02569 <span class="keywordflow">if</span> (this-><a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew0">Alpha</a>) +02570 <span class="keywordflow">return</span> CRGBAF (1.f, 1.f, 1.f, finalVal); +02571 <span class="keywordflow">else</span> <span class="comment">// Luminance</span> +02572 <span class="keywordflow">return</span> CRGBAF (finalVal, finalVal, finalVal, 1.f); +02573 } +02574 <span class="keywordflow">break</span>; +02575 <span class="keywordflow">default</span>: <span class="keywordflow">break</span>; +02576 } +02577 +02578 <span class="keywordflow">return</span> CRGBAF (0.0f, 0.0f, 0.0f, 0.0f); +02579 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea12" doxytag="NL3D::CTextureBump::getHeight" ></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#a11">uint32</a> NLMISC::CBitmap::getHeight </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname1" valign="top" nowrap> <em>numMipMap</em> = 0 </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the image height, or a mipmap height. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>mipMap</em> </td><td>mipmap level </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>image height (0 if mipmap not found)</dd></dl> + +<p> +Definition at line <a class="el" href="a05486.html#l01388">1388</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05646.html#l00236">w</a>. +<p> +Referenced by <a class="el" href="a05790.html#l00152">NL3D::CHLSColorTexture::addMask()</a>, <a class="el" href="a05935.html#l00809">NL3D::CLodCharacterTmpBitmap::build()</a>, <a class="el" href="a05567.html#l00070">NL3D::CCoarseMeshBuild::buildBitmap()</a>, <a class="el" href="a06521.html#l00041">NL3D::CTextureFile::buildBitmapFromFile()</a>, <a class="el" href="a05722.html#l00088">NL3D::CFontManager::computeString()</a>, <a class="el" href="a05706.html#l00393">NL3D::CFastHLSModifier::convertDDSBitmap()</a>, <a class="el" href="a06768.html#l00712">draw2dLine()</a>, <a class="el" href="a05567.html#l00367">NL3D::CCoarseMeshBuild::expand()</a>, <a class="el" href="a05642.html#l02171">NL3D::CDriverGL::fillBuffer()</a>, <a class="el" href="a05486.html#l02682">NLMISC::CBitmap::flipH()</a>, <a class="el" href="a05486.html#l02714">NLMISC::CBitmap::flipV()</a>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a05486.html#l02470">NLMISC::CBitmap::getColor()</a>, <a class="el" href="a05486.html#l03048">NLMISC::CBitmap::getDXTC1Texel()</a>, <a class="el" href="a05486.html#l03061">NLMISC::CBitmap::getDXTC3Texel()</a>, <a class="el" href="a05486.html#l03077">NLMISC::CBitmap::getDXTC5Texel()</a>, <a class="el" href="a05486.html#l02980">NLMISC::CBitmap::getRGBAPixel()</a>, <a class="el" href="a05486.html#l01412">NLMISC::CBitmap::getSize()</a>, <a class="el" href="a06525.html#l00039">NL3D::GetTextureSize()</a>, <a class="el" href="a06536.html#l00442">NL3D::CTileBank::getTileNoiseMap()</a>, <a class="el" href="a06768.html#l02927">NL3D::CZoneLighter::lightWater()</a>, <a class="el" href="a06378.html#l00308">NL3D::CShapeBank::processWSUploadTexture()</a>, <a class="el" href="a06768.html#l00444">RenderTriangle()</a>, <a class="el" href="a05486.html#l02781">NLMISC::CBitmap::rot90CCW()</a>, <a class="el" href="a05486.html#l02746">NLMISC::CBitmap::rot90CW()</a>, <a class="el" href="a05790.html#l00092">NL3D::CHLSColorTexture::setBitmap()</a>, <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>, <a class="el" href="a05652.html#l00807">NL3D::CDriverGL::uploadTexture()</a>, and <a class="el" href="a05463.html#l00451">NL3D::CAsyncTextureManager::uploadTexturePart()</a>. +<p> +<div class="fragment"><pre>01389 { +01390 <span class="keywordflow">if</span>(mipMap==0) <span class="keywordflow">return</span> <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>; +01391 +01392 <a class="code" href="a04558.html#a11">uint32</a> <a class="code" href="a04223.html#a575">w</a> = <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>; +01393 <a class="code" href="a04558.html#a11">uint32</a> h = <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>; +01394 <a class="code" href="a04558.html#a11">uint32</a> m = 0; +01395 +01396 <span class="keywordflow">do</span> +01397 { +01398 m++; +01399 <a class="code" href="a04223.html#a575">w</a> = (<a class="code" href="a04223.html#a575">w</a>+1)/2; +01400 h = (h+1)/2; +01401 <span class="keywordflow">if</span>(m==mipMap) <span class="keywordflow">return</span> h; +01402 } +01403 <span class="keywordflow">while</span>(<a class="code" href="a04223.html#a575">w</a>!=1 || h!=1); +01404 +01405 <span class="keywordflow">return</span> 0; +01406 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa17" doxytag="NL3D::CTextureBump::getHeightMap" ></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"> const <a class="el" href="a03487.html">ITexture</a>* NL3D::CTextureBump::getHeightMap </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +get the height map used to generate this bumpmap (const version) +<p> + +<p> +Definition at line <a class="el" href="a06512.html#l00056">56</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +References <a class="el" href="a06512.html#l00103">_HeightMap</a>. +<p> +<div class="fragment"><pre>00056 { <span class="keywordflow">return</span> <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>; }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa18" doxytag="NL3D::CTextureBump::getHeightMap" ></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="a03487.html">ITexture</a>* NL3D::CTextureBump::getHeightMap </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> +get the height map used to generate this bumpmap +<p> + +<p> +Definition at line <a class="el" href="a06512.html#l00054">54</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +References <a class="el" href="a06512.html#l00103">_HeightMap</a>. +<p> +Referenced by <a class="el" href="a06257.html#l00863">NL3D::ConvertFromBumpMap()</a>, and <a class="el" href="a06737.html#l01170">NL3D::CWaterModel::doSimpleRender()</a>. +<p> +<div class="fragment"><pre>00054 { <span class="keywordflow">return</span> <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>; }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturez981_0" doxytag="NL3D::CTextureBump::getMagFilter" ></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="a03487.html#NL3D_1_1ITexturew29">TMagFilter</a> NL3D::ITexture::getMagFilter </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06506.html#l00214">214</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00410">NL3D::ITexture::_MagFilter</a>, and <a class="el" href="a06506.html#l00148">NL3D::ITexture::TMagFilter</a>. +<p> +Referenced by <a class="el" href="a05652.html#l00941">NL3D::CDriverGL::activateTexture()</a>, and <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>. +<p> +<div class="fragment"><pre>00214 {<span class="keywordflow">return</span> _MagFilter;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturez981_1" doxytag="NL3D::CTextureBump::getMinFilter" ></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="a03487.html#NL3D_1_1ITexturew30">TMinFilter</a> NL3D::ITexture::getMinFilter </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06506.html#l00215">215</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00409">NL3D::ITexture::_MinFilter</a>, and <a class="el" href="a06506.html#l00159">NL3D::ITexture::TMinFilter</a>. +<p> +Referenced by <a class="el" href="a05652.html#l00941">NL3D::CDriverGL::activateTexture()</a>, and <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>. +<p> +<div class="fragment"><pre>00215 {<span class="keywordflow">return</span> _MinFilter;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea13" doxytag="NL3D::CTextureBump::getMipMapCount" ></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#a11">uint32</a> NLMISC::CBitmap::getMipMapCount </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the number of mipmaps. Level0 is a mipmap... <dl compact><dt><b>Returns:</b></dt><dd>number of mipmaps. 0 if no image at all. 1 if no mipmaping (for the base level).</dd></dl> + +<p> +Definition at line <a class="el" href="a05487.html#l00369">369</a> of file <a class="el" href="a05487.html">bitmap.h</a>. +<p> +References <a class="el" href="a05487.html#l00093">NLMISC::CBitmap::_MipMapCount</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +Referenced by <a class="el" href="a05790.html#l00152">NL3D::CHLSColorTexture::addMask()</a>, <a class="el" href="a06378.html#l00308">NL3D::CShapeBank::processWSUploadTexture()</a>, <a class="el" href="a05790.html#l00092">NL3D::CHLSColorTexture::setBitmap()</a>, <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>, <a class="el" href="a05652.html#l00807">NL3D::CDriverGL::uploadTexture()</a>, <a class="el" href="a05463.html#l00451">NL3D::CAsyncTextureManager::uploadTexturePart()</a>, and <a class="el" href="a05463.html#l00619">NL3D::CAsyncTextureManager::validDXTCMipMap()</a>. +<p> +<div class="fragment"><pre>00370 { +00371 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>; +00372 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa20" doxytag="NL3D::CTextureBump::getNormalizationFactor" ></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 NL3D::CTextureBump::getNormalizationFactor </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +============================================================================================== +<p> + +<p> +Definition at line <a class="el" href="a06511.html#l00382">382</a> of file <a class="el" href="a06511.html">texture_bump.cpp</a>. +<p> +References <a class="el" href="a06511.html#l00034">_NameToNF</a>, <a class="el" href="a06512.html#l00117">_NameToNFHandle</a>, <a class="el" href="a06512.html#l00104">_NormalizationFactor</a>, <a class="el" href="a06511.html#l00277">doGenerate()</a>, <a class="el" href="a06506.html#l00267">NL3D::ITexture::getReleasable()</a>, <a class="el" href="a06511.html#l00375">getShareName()</a>, and <a class="el" href="a06511.html#l00354">release()</a>. +<p> +Referenced by <a class="el" href="a06257.html#l00733">NL3D::CPSMultiTexturedParticle::setupMaterial()</a>, and <a class="el" href="a05648.html#l02064">NL3D::CDriverGL::setupWaterPassNV20()</a>. +<p> +<div class="fragment"><pre>00383 { +00384 <span class="keywordflow">if</span> (!<a class="code" href="a03487.html#NL3D_1_1ITexturep4">_Touched</a>) +00385 { +00386 <span class="keywordflow">if</span> (<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp8">_NormalizationFactor</a>) <span class="keywordflow">return</span> *<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp8">_NormalizationFactor</a>; +00387 } +00388 <span class="comment">// not computed yet, see if another map has computed it</span> +00389 TNameToNI::iterator it = <a class="code" href="a03489.html#NL3D_1_1CTextureBumpt0">_NameToNF</a>.find(<a class="code" href="a03489.html#NL3D_1_1CTextureBumpa25">getShareName</a>()); +00390 <span class="keywordflow">if</span> (it != <a class="code" href="a03489.html#NL3D_1_1CTextureBumpt0">_NameToNF</a>.end()) +00391 { +00392 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp7">_NameToNFHandle</a> = it; +00393 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp8">_NormalizationFactor</a> = &(it->second.NormalizationFactor); +00394 ++(it->second.NumRefs); +00395 } +00396 <span class="keywordflow">else</span> +00397 { +00398 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpb0">doGenerate</a>(); +00399 <span class="keywordflow">if</span> (this-><a class="code" href="a03487.html#NL3D_1_1ITexturea17">getReleasable</a>()) this-><a class="code" href="a03489.html#NL3D_1_1CTextureBumpa39">release</a>(); +00400 } +00401 <span class="keywordflow">return</span> <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp8">_NormalizationFactor</a> ? *<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp8">_NormalizationFactor</a> : 1.f; +00402 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea14" doxytag="NL3D::CTextureBump::getPixelColor" ></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">CRGBA</a> NLMISC::CBitmap::getPixelColor </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname" nowrap> <em>x</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname" nowrap> <em>y</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname" nowrap> <em>numMipMap</em> = 0</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Get the pixel at the given coorrdinate. Works in RGBA and DXTC modes. Outside of the bitmap it returns Black (or if mipmap is not found) +<p> +Definition at line <a class="el" href="a05486.html#l03134">3134</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05486.html#l03048">NLMISC::CBitmap::getDXTC1Texel()</a>, <a class="el" href="a05486.html#l03061">NLMISC::CBitmap::getDXTC3Texel()</a>, <a class="el" href="a05486.html#l03077">NLMISC::CBitmap::getDXTC5Texel()</a>, <a class="el" href="a05486.html#l02980">NLMISC::CBitmap::getRGBAPixel()</a>, <a class="el" href="a05622.html#l00416">nlstop</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">NLMISC::CBitmap::RGBA</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>. +<p> +Referenced by <a class="el" href="a05486.html#l02470">NLMISC::CBitmap::getColor()</a>. +<p> +<div class="fragment"><pre>03135 { +03136 +03137 <span class="keywordflow">switch</span> (<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a>) +03138 { +03139 <span class="keywordflow">case</span> <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>: +03140 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NLMISC_1_1CBitmapd5">getRGBAPixel</a>(x, y, numMipMap); +03141 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew6">DXTC1</a>: +03142 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew7">DXTC1Alpha</a>: +03143 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NLMISC_1_1CBitmapz1926_0">getDXTC1Texel</a>(x, y, numMipMap); +03144 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew8">DXTC3</a>: +03145 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NLMISC_1_1CBitmapz1926_1">getDXTC3Texel</a>(x, y, numMipMap); +03146 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew9">DXTC5</a>: +03147 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NLMISC_1_1CBitmapz1926_2">getDXTC5Texel</a>(x, y, numMipMap); +03148 <span class="keywordflow">default</span>: +03149 <a class="code" href="a04199.html#a12">nlstop</a>; +03150 <span class="keywordflow">break</span>; +03151 } +03152 <span class="keywordflow">return</span> CRGBA::Black; +03153 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea15" doxytag="NL3D::CTextureBump::getPixelFormat" ></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="a02268.html#NL3D_1_1ITexturew31">TType</a> NLMISC::CBitmap::getPixelFormat </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the format of pixels stored at the present time in the object buffer. <dl compact><dt><b>Returns:</b></dt><dd>Pixel format (rgba luminance alpha alphaLuminance dxtc1 dxtc1Alpha dxtc3 dxtc5)</dd></dl> + +<p> +Definition at line <a class="el" href="a05487.html#l00335">335</a> of file <a class="el" href="a05487.html">bitmap.h</a>. +<p> +References <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>. +<p> +Referenced by <a class="el" href="a05706.html#l00393">NL3D::CFastHLSModifier::convertDDSBitmap()</a>, <a class="el" href="a05706.html#l00414">NL3D::CFastHLSModifier::convertRGBABitmap()</a>, <a class="el" href="a06525.html#l00178">NL3D::CTextureGrouped::doGenerate()</a>, <a class="el" href="a05642.html#l02171">NL3D::CDriverGL::fillBuffer()</a>, <a class="el" href="a05652.html#l00170">NL3D::getGlSrcTextureFormat()</a>, <a class="el" href="a05652.html#l00099">NL3D::CDriverGL::getGlTextureFormat()</a>, <a class="el" href="a06378.html#l00308">NL3D::CShapeBank::processWSUploadTexture()</a>, <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>, <a class="el" href="a05790.html#l00092">NL3D::CHLSColorTexture::setBitmap()</a>, <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>, <a class="el" href="a05463.html#l00361">NL3D::CAsyncTextureManager::update()</a>, <a class="el" href="a05652.html#l00807">NL3D::CDriverGL::uploadTexture()</a>, <a class="el" href="a05463.html#l00451">NL3D::CAsyncTextureManager::uploadTexturePart()</a>, and <a class="el" href="a05463.html#l00619">NL3D::CAsyncTextureManager::validDXTCMipMap()</a>. +<p> +<div class="fragment"><pre>00336 { +00337 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a>; +00338 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturez1927_0" doxytag="NL3D::CTextureBump::getPixels" ></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"> const <a class="el" href="a03000.html">CObjectVector</a><<a class="el" href="a04558.html#a7">uint8</a>>& NLMISC::CBitmap::getPixels </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname1" valign="top" nowrap> <em>numMipMap</em> = 0 </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05487.html#l00313">313</a> of file <a class="el" href="a05487.html">bitmap.h</a>. +<p> +References <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +<div class="fragment"><pre>00314 { +00315 <span class="comment">//nlassert (numMipMap<=_MipMapCount);</span> +00316 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[numMipMap]; +00317 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturez1927_1" doxytag="NL3D::CTextureBump::getPixels" ></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="a03000.html">CObjectVector</a><<a class="el" href="a04558.html#a7">uint8</a>>& NLMISC::CBitmap::getPixels </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname1" valign="top" nowrap> <em>numMipMap</em> = 0 </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the pixels buffer of the image, or of one of its mipmap. Return a reference of an array in pixel format get with <a class="el" href="a02268.html#NL3D_1_1ITexturea15">getPixelFormat()</a>. <dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="a03000.html">CObjectVector<uint8></a>& RGBA pixels</dd></dl> + +<p> +Definition at line <a class="el" href="a05487.html#l00308">308</a> of file <a class="el" href="a05487.html">bitmap.h</a>. +<p> +References <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +Referenced by <a class="el" href="a05790.html#l00152">NL3D::CHLSColorTexture::addMask()</a>, <a class="el" href="a05935.html#l00809">NL3D::CLodCharacterTmpBitmap::build()</a>, <a class="el" href="a06521.html#l00041">NL3D::CTextureFile::buildBitmapFromFile()</a>, <a class="el" href="a05790.html#l00337">NL3D::CHLSColorTexture::buildColorVersion()</a>, <a class="el" href="a05706.html#l00252">NL3D::CFastHLSModifier::convertDDSBitmapDXTC1Or1A()</a>, <a class="el" href="a05706.html#l00354">NL3D::CFastHLSModifier::convertDDSBitmapDXTC3Or5()</a>, <a class="el" href="a05706.html#l00414">NL3D::CFastHLSModifier::convertRGBABitmap()</a>, <a class="el" href="a06515.html#l00241">NL3D::CTextureDLM::copyRect()</a>, <a class="el" href="a06523.html#l00067">NL3D::CTextureFont::CTextureFont()</a>, <a class="el" href="a06527.html#l00045">NL3D::CTextureMem::doGenerate()</a>, <a class="el" href="a06517.html#l00101">NL3D::CTextureEmboss::doGenerate()</a>, <a class="el" href="a06511.html#l00277">doGenerate()</a>, <a class="el" href="a06768.html#l00712">draw2dLine()</a>, <a class="el" href="a06523.html#l00133">NL3D::CTextureFont::dumpTextureFont()</a>, <a class="el" href="a05567.html#l00367">NL3D::CCoarseMeshBuild::expand()</a>, <a class="el" href="a05642.html#l02171">NL3D::CDriverGL::fillBuffer()</a>, <a class="el" href="a06515.html#l00257">NL3D::CTextureDLM::fillRect()</a>, <a class="el" href="a05642.html#l02131">NL3D::CDriverGL::getBufferPart()</a>, <a class="el" href="a05486.html#l02470">NLMISC::CBitmap::getColor()</a>, <a class="el" href="a05486.html#l03048">NLMISC::CBitmap::getDXTC1Texel()</a>, <a class="el" href="a05486.html#l03061">NLMISC::CBitmap::getDXTC3Texel()</a>, <a class="el" href="a05486.html#l03077">NLMISC::CBitmap::getDXTC5Texel()</a>, <a class="el" href="a05486.html#l02980">NLMISC::CBitmap::getRGBAPixel()</a>, <a class="el" href="a06536.html#l00442">NL3D::CTileBank::getTileNoiseMap()</a>, <a class="el" href="a06768.html#l02927">NL3D::CZoneLighter::lightWater()</a>, <a class="el" href="a06515.html#l00273">NL3D::CTextureDLM::modulateAndfillRect565()</a>, <a class="el" href="a06515.html#l00305">NL3D::CTextureDLM::modulateAndfillRect8888()</a>, <a class="el" href="a06515.html#l00335">NL3D::CTextureDLM::modulateConstantAndfillRect()</a>, <a class="el" href="a06519.html#l00465">NL3D::CTextureFar::rebuildPatch()</a>, <a class="el" href="a06768.html#l00444">RenderTriangle()</a>, <a class="el" href="a05790.html#l00092">NL3D::CHLSColorTexture::setBitmap()</a>, <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>, and <a class="el" href="a05652.html#l00807">NL3D::CDriverGL::uploadTexture()</a>. +<p> +<div class="fragment"><pre>00309 { +00310 <span class="comment">//nlassert (numMipMap<=_MipMapCount);</span> +00311 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[numMipMap]; +00312 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLGEORGES_1_1UTypea8" doxytag="NL3D::CTextureBump::getRefCount" ></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"> const <a class="el" href="a04558.html#a14">sint</a>& NLMISC::CRefCount::getRefCount </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06402.html#l00070">70</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>. +<p> +References <a class="el" href="a06402.html#l00079">NLMISC::CRefCount::crefs</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>00071 { +00072 <span class="keywordflow">return</span> <a class="code" href="a02209.html#NLGEORGES_1_1UTypeo0">crefs</a>; +00073 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea17" doxytag="NL3D::CTextureBump::getReleasable" ></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 NL3D::ITexture::getReleasable </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return whether texture can be released. If it returns true, the driver will release the texture after generate it and upload it into the videomemory by calling <a class="el" href="a03487.html#NL3D_1_1ITexturea28">release()</a>. If it returns false, the driver won't release the texture.<p> +<dl compact><dt><b>Returns:</b></dt><dd>true if texture can be released, false else </dd></dl> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03487.html#NL3D_1_1ITexturea41">setReleasable()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a></dd></dl> + +<p> +Definition at line <a class="el" href="a06506.html#l00267">267</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00405">NL3D::ITexture::_Releasable</a>. +<p> +Referenced by <a class="el" href="a06511.html#l00382">getNormalizationFactor()</a>, <a class="el" href="a06525.html#l00039">NL3D::GetTextureSize()</a>, <a class="el" href="a06378.html#l00308">NL3D::CShapeBank::processWSUploadTexture()</a>, <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>, and <a class="el" href="a05463.html#l00451">NL3D::CAsyncTextureManager::uploadTexturePart()</a>. +<p> +<div class="fragment"><pre>00267 { <span class="keywordflow">return</span> _Releasable; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa25" doxytag="NL3D::CTextureBump::getShareName" ></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"> std::string NL3D::CTextureBump::getShareName </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +============================================================================================== +<p> + +<p> +Reimplemented from <a class="el" href="a03487.html#NL3D_1_1ITexturea18">NL3D::ITexture</a>. +<p> +Definition at line <a class="el" href="a06511.html#l00375">375</a> of file <a class="el" href="a06511.html">texture_bump.cpp</a>. +<p> +References <a class="el" href="a06512.html#l00103">_HeightMap</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a06511.html#l00368">supportSharing()</a>. +<p> +Referenced by <a class="el" href="a06511.html#l00277">doGenerate()</a>, and <a class="el" href="a06511.html#l00382">getNormalizationFactor()</a>. +<p> +<div class="fragment"><pre>00376 { +00377 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a03489.html#NL3D_1_1CTextureBumpa57">supportSharing</a>()); +00378 <span class="keywordflow">return</span> <span class="stringliteral">"BumpDsDt:"</span> + <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->getShareName(); +00379 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa26" doxytag="NL3D::CTextureBump::getSignedFormat" ></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 NL3D::CTextureBump::getSignedFormat </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06512.html#l00091">91</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +References <a class="el" href="a06512.html#l00108">_Signed</a>. +<p> +<div class="fragment"><pre>00091 { <span class="keywordflow">return</span> <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp9">_Signed</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea19" doxytag="NL3D::CTextureBump::getSize" ></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#a11">uint32</a> NLMISC::CBitmap::getSize </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname1" valign="top" nowrap> <em>numMipMap</em> = 0 </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the size (in pixels) of the image: <=> <a class="el" href="a02268.html#NL3D_1_1ITexturea12">getHeight()</a>*getWidth(). <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>mipMap</em> </td><td>mipmap level </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>image size (0 if mipmap not found)</dd></dl> + +<p> +Definition at line <a class="el" href="a05486.html#l01412">1412</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05486.html#l01388">NLMISC::CBitmap::getHeight()</a>, <a class="el" href="a05486.html#l01363">NLMISC::CBitmap::getWidth()</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +Referenced by <a class="el" href="a06378.html#l00308">NL3D::CShapeBank::processWSUploadTexture()</a>, <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>, <a class="el" href="a05463.html#l00361">NL3D::CAsyncTextureManager::update()</a>, and <a class="el" href="a05463.html#l00451">NL3D::CAsyncTextureManager::uploadTexturePart()</a>. +<p> +<div class="fragment"><pre>01413 { +01414 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NL3D_1_1ITexturea12">getHeight</a>(numMipMap)*<a class="code" href="a02268.html#NL3D_1_1ITexturea20">getWidth</a>(numMipMap); +01415 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturez981_2" doxytag="NL3D::CTextureBump::getUploadFormat" ></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="a03487.html#NL3D_1_1ITexturew32">TUploadFormat</a> NL3D::ITexture::getUploadFormat </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06506.html#l00212">212</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00406">NL3D::ITexture::_UploadFormat</a>, and <a class="el" href="a06506.html#l00125">NL3D::ITexture::TUploadFormat</a>. +<p> +Referenced by <a class="el" href="a06511.html#l00277">doGenerate()</a>, <a class="el" href="a05652.html#l00099">NL3D::CDriverGL::getGlTextureFormat()</a>, and <a class="el" href="a05639.html#l00277">NL3D::IDriver::getTextureShareName()</a>. +<p> +<div class="fragment"><pre>00212 {<span class="keywordflow">return</span> _UploadFormat;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea20" doxytag="NL3D::CTextureBump::getWidth" ></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#a11">uint32</a> NLMISC::CBitmap::getWidth </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname1" valign="top" nowrap> <em>numMipMap</em> = 0 </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the image width, or a mipmap width. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>mipMap</em> </td><td>mipmap level </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>image width (0 if mipmap not found)</dd></dl> + +<p> +Definition at line <a class="el" href="a05486.html#l01363">1363</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05646.html#l00236">w</a>. +<p> +Referenced by <a class="el" href="a05790.html#l00152">NL3D::CHLSColorTexture::addMask()</a>, <a class="el" href="a06372.html#l00957">NL3D::CShadowMapManager::allocateTexture()</a>, <a class="el" href="a05935.html#l00809">NL3D::CLodCharacterTmpBitmap::build()</a>, <a class="el" href="a05567.html#l00070">NL3D::CCoarseMeshBuild::buildBitmap()</a>, <a class="el" href="a06521.html#l00041">NL3D::CTextureFile::buildBitmapFromFile()</a>, <a class="el" href="a05722.html#l00088">NL3D::CFontManager::computeString()</a>, <a class="el" href="a05706.html#l00393">NL3D::CFastHLSModifier::convertDDSBitmap()</a>, <a class="el" href="a06515.html#l00241">NL3D::CTextureDLM::copyRect()</a>, <a class="el" href="a06768.html#l00712">draw2dLine()</a>, <a class="el" href="a05567.html#l00367">NL3D::CCoarseMeshBuild::expand()</a>, <a class="el" href="a05642.html#l02171">NL3D::CDriverGL::fillBuffer()</a>, <a class="el" href="a06515.html#l00257">NL3D::CTextureDLM::fillRect()</a>, <a class="el" href="a05486.html#l02682">NLMISC::CBitmap::flipH()</a>, <a class="el" href="a05486.html#l02714">NLMISC::CBitmap::flipV()</a>, <a class="el" href="a06163.html#l00214">NL3D::CPatchDLMContext::generate()</a>, <a class="el" href="a05486.html#l02470">NLMISC::CBitmap::getColor()</a>, <a class="el" href="a05486.html#l03048">NLMISC::CBitmap::getDXTC1Texel()</a>, <a class="el" href="a05486.html#l03061">NLMISC::CBitmap::getDXTC3Texel()</a>, <a class="el" href="a05486.html#l03077">NLMISC::CBitmap::getDXTC5Texel()</a>, <a class="el" href="a05486.html#l02980">NLMISC::CBitmap::getRGBAPixel()</a>, <a class="el" href="a05486.html#l01412">NLMISC::CBitmap::getSize()</a>, <a class="el" href="a06525.html#l00039">NL3D::GetTextureSize()</a>, <a class="el" href="a06536.html#l00442">NL3D::CTileBank::getTileNoiseMap()</a>, <a class="el" href="a06768.html#l02927">NL3D::CZoneLighter::lightWater()</a>, <a class="el" href="a06515.html#l00273">NL3D::CTextureDLM::modulateAndfillRect565()</a>, <a class="el" href="a06515.html#l00305">NL3D::CTextureDLM::modulateAndfillRect8888()</a>, <a class="el" href="a06515.html#l00335">NL3D::CTextureDLM::modulateConstantAndfillRect()</a>, <a class="el" href="a06378.html#l00308">NL3D::CShapeBank::processWSUploadTexture()</a>, <a class="el" href="a06768.html#l00444">RenderTriangle()</a>, <a class="el" href="a05486.html#l02781">NLMISC::CBitmap::rot90CCW()</a>, <a class="el" href="a05486.html#l02746">NLMISC::CBitmap::rot90CW()</a>, <a class="el" href="a05790.html#l00092">NL3D::CHLSColorTexture::setBitmap()</a>, <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>, <a class="el" href="a05652.html#l00807">NL3D::CDriverGL::uploadTexture()</a>, and <a class="el" href="a05463.html#l00451">NL3D::CAsyncTextureManager::uploadTexturePart()</a>. +<p> +<div class="fragment"><pre>01364 { +01365 <span class="keywordflow">if</span>(mipMap==0) <span class="keywordflow">return</span> <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>; +01366 +01367 <a class="code" href="a04558.html#a11">uint32</a> <a class="code" href="a04223.html#a575">w</a> = <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>; +01368 <a class="code" href="a04558.html#a11">uint32</a> h = <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>; +01369 <a class="code" href="a04558.html#a11">uint32</a> m = 0; +01370 +01371 <span class="keywordflow">do</span> +01372 { +01373 m++; +01374 <a class="code" href="a04223.html#a575">w</a> = (<a class="code" href="a04223.html#a575">w</a>+1)/2; +01375 h = (h+1)/2; +01376 <span class="keywordflow">if</span>(m==mipMap) <span class="keywordflow">return</span> <a class="code" href="a04223.html#a575">w</a>; +01377 } +01378 <span class="keywordflow">while</span>(<a class="code" href="a04223.html#a575">w</a>!=1 || h!=1); +01379 +01380 <span class="keywordflow">return</span> 0; +01381 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturez981_3" doxytag="NL3D::CTextureBump::getWrapS" ></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="a03487.html#NL3D_1_1ITexturew33">TWrapMode</a> NL3D::ITexture::getWrapS </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06506.html#l00204">204</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00407">NL3D::ITexture::_WrapS</a>. +<p> +Referenced by <a class="el" href="a05652.html#l00941">NL3D::CDriverGL::activateTexture()</a>, <a class="el" href="a06768.html#l01820">NL3D::CZoneLighter::getTexture()</a>, and <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>. +<p> +<div class="fragment"><pre>00204 {<span class="keywordflow">return</span> _WrapS;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturez981_4" doxytag="NL3D::CTextureBump::getWrapT" ></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="a03487.html#NL3D_1_1ITexturew33">TWrapMode</a> NL3D::ITexture::getWrapT </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06506.html#l00205">205</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00408">NL3D::ITexture::_WrapT</a>. +<p> +Referenced by <a class="el" href="a05652.html#l00941">NL3D::CDriverGL::activateTexture()</a>, <a class="el" href="a06768.html#l01820">NL3D::CZoneLighter::getTexture()</a>, and <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>. +<p> +<div class="fragment"><pre>00205 {<span class="keywordflow">return</span> _WrapT;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea21" doxytag="NL3D::CTextureBump::isAllInvalidated" ></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 NL3D::ITexture::isAllInvalidated </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return true if ALL the texture is invalidate, else return false. +<p> +Definition at line <a class="el" href="a06506.html#l00428">428</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00422">NL3D::ITexture::_ListInvalidRect</a>. +<p> +Referenced by <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>, and <a class="el" href="a06506.html#l00242">NL3D::ITexture::touchRect()</a>. +<p> +<div class="fragment"><pre>00429 { +00430 <span class="keywordflow">return</span> <a class="code" href="a03487.html#NL3D_1_1ITexturep4">_Touched</a>&&(<a class="code" href="a03487.html#NL3D_1_1ITextureo0">_ListInvalidRect</a>.begin()==<a class="code" href="a03487.html#NL3D_1_1ITextureo0">_ListInvalidRect</a>.end()); +00431 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa30" doxytag="NL3D::CTextureBump::isBumpMap" ></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"> virtual bool NL3D::CTextureBump::isBumpMap </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Reimplemented from <a class="el" href="a03487.html#NL3D_1_1ITexturea22">NL3D::ITexture</a>. +<p> +Definition at line <a class="el" href="a06512.html#l00098">98</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +<div class="fragment"><pre>00098 { <span class="keywordflow">return</span> <span class="keyword">true</span>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea23" doxytag="NL3D::CTextureBump::isGrayscaleAsAlpha" ></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 NLMISC::CBitmap::isGrayscaleAsAlpha </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Tell if the bitmap loads grayscale bitmap as alpha or luminance format.<p> +<dl compact><dt><b>Returns:</b></dt><dd>true if the bitmap loads grayscale bitmaps as alpha, false if it loads grayscale bitmaps as luminance.</dd></dl> + +<p> +Definition at line <a class="el" href="a05487.html#l00483">483</a> of file <a class="el" href="a05487.html">bitmap.h</a>. +<p> +References <a class="el" href="a05487.html#l00094">NLMISC::CBitmap::_LoadGrayscaleAsAlpha</a>. +<p> +<div class="fragment"><pre>00484 { +00485 <span class="keywordflow">return</span> <a class="code" href="a02268.html#NL3D_1_1ITexturep2">_LoadGrayscaleAsAlpha</a>; +00486 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa32" doxytag="NL3D::CTextureBump::isNormalizationForced" ></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 NL3D::CTextureBump::isNormalizationForced </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Test wether normalization is forced with that texture. +<p> + +<p> +Definition at line <a class="el" href="a06512.html#l00079">79</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +<div class="fragment"><pre>00079 { <span class="keywordflow">return</span> <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp2">_ForceNormalize</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea24" doxytag="NL3D::CTextureBump::isSelectable" ></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"> virtual bool NL3D::ITexture::isSelectable </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Test wether this texture is selectable. +<p> + +<p> +Reimplemented in <a class="el" href="a03492.html#NL3D_1_1CTextureCubea28">NL3D::CTextureCube</a>, and <a class="el" href="a03512.html#NL3D_1_1CTextureMultiFilea28">NL3D::CTextureMultiFile</a>. +<p> +Definition at line <a class="el" href="a06506.html#l00363">363</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +Referenced by <a class="el" href="a05993.html#l00268">NL3D::CMeshBaseInstance::selectTextureSet()</a>. +<p> +<div class="fragment"><pre>00363 { <span class="keywordflow">return</span> <span class="keyword">false</span>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa34" doxytag="NL3D::CTextureBump::isSharingEnabled" ></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 NL3D::CTextureBump::isSharingEnabled </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06512.html#l00067">67</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +References <a class="el" href="a06512.html#l00105">_DisableSharing</a>. +<p> +<div class="fragment"><pre>00067 { <span class="keywordflow">return</span> !<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp1">_DisableSharing</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturez982_0" doxytag="NL3D::CTextureBump::isTextureCube" ></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"> virtual bool NL3D::ITexture::isTextureCube </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Does this texture is a cube texture. +<p> + +<p> +Reimplemented in <a class="el" href="a03492.html#NL3D_1_1CTextureCubea29">NL3D::CTextureCube</a>. +<p> +Definition at line <a class="el" href="a06506.html#l00376">376</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +Referenced by <a class="el" href="a05652.html#l00941">NL3D::CDriverGL::activateTexture()</a>, <a class="el" href="a05648.html#l00080">NL3D::convTexAddr()</a>, <a class="el" href="a05642.html#l02185">NL3D::CDriverGL::copyFrameBufferToTexture()</a>, <a class="el" href="a06378.html#l00308">NL3D::CShapeBank::processWSUploadTexture()</a>, <a class="el" href="a05648.html#l00117">NL3D::CDriverGL::setTextureEnvFunction()</a>, <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>, <a class="el" href="a05652.html#l00807">NL3D::CDriverGL::uploadTexture()</a>, and <a class="el" href="a05652.html#l00930">NL3D::CDriverGL::uploadTextureCube()</a>. +<p> +<div class="fragment"><pre>00376 { <span class="keywordflow">return</span> <span class="keyword">false</span>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea25" doxytag="NL3D::CTextureBump::load" ></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> NLMISC::CBitmap::load </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> & </td> + <td class="mdname" nowrap> <em>f</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>mipMapSkip</em> = 0</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Read a bitmap(TGA or DDS) from an <a class="el" href="a02270.html">IStream</a>. Bitmap supported are DDS (DXTC1, DXTC1 with Alpha, DXTC3, DXTC5, and uncompressed TGA (24 and 32 bits). <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>IStream</em> </td><td>The stream must be in reading mode. </td></tr> + <tr><td valign=top><em>mipMapSkip</em> </td><td>if the file is a DDS with mipMap. N=mipMapSkip mipmaps are skipped. </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>image depth (24 or 32), or 0 if load failed </dd></dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>ESeekFailed</em> </td><td>: seek has failed</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a05486.html#l00109">109</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a02270.html#NLMISC_1_1IStreamz2036_0NLMISC_1_1IStreamw0">NLMISC::IStream::begin</a>, <a class="el" href="a05487.html#l00059">NLMISC::DDS</a>, <a class="el" href="a05646.html#l01013">depth</a>, <a class="el" href="a05646.html#l01013">height</a>, <a class="el" href="a06463.html#l00064">NLMISC::IStream::isReading()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05486.html#l00244">NLMISC::CBitmap::readDDS()</a>, <a class="el" href="a05486.html#l01800">NLMISC::CBitmap::readTGA()</a>, <a class="el" href="a06461.html#l00401">NLMISC::IStream::seek()</a>, <a class="el" href="a06462.html#l00232">NLMISC::IStream::serial()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a05646.html#l01013">width</a>. +<p> +Referenced by <a class="el" href="a06521.html#l00041">NL3D::CTextureFile::buildBitmapFromFile()</a>, and <a class="el" href="a06527.html#l00045">NL3D::CTextureMem::doGenerate()</a>. +<p> +<div class="fragment"><pre>00110 { +00111 <a class="code" href="a04199.html#a6">nlassert</a>(f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>()); +00112 +00113 <span class="comment">// testing if DDS</span> +00114 <a class="code" href="a04558.html#a11">uint32</a> fileType = 0;; +00115 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(fileType); +00116 <span class="keywordflow">if</span>(fileType == <a class="code" href="a05378.html#a41">DDS</a>) +00117 { +00118 <span class="preprocessor">#ifdef NEL_ALL_BITMAP_WHITE</span> +00119 <span class="preprocessor"></span> <a class="code" href="a04558.html#a7">uint8</a> result = <a class="code" href="a02268.html#NLMISC_1_1CBitmapd6">readDDS</a>(f, mipMapSkip); +00120 MakeWhite (*<span class="keyword">this</span>); +00121 <span class="keywordflow">return</span> result; +00122 <span class="preprocessor">#else // NEL_ALL_BITMAP_WHITE</span> +00123 <span class="preprocessor"></span> <span class="keywordflow">return</span> <a class="code" href="a02268.html#NLMISC_1_1CBitmapd6">readDDS</a>(f, mipMapSkip); +00124 <span class="preprocessor">#endif // NEL_ALL_BITMAP_WHITE</span> +00125 <span class="preprocessor"></span> } +00126 <span class="comment">// assuming it's TGA</span> +00127 <span class="keywordflow">else</span> +00128 { +00129 <a class="code" href="a02270.html#NLMISC_1_1IStreamz2036_0">NLMISC::IStream::TSeekOrigin</a> origin= f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2036_0NLMISC_1_1IStreamw0">begin</a>; +00130 <span class="keywordflow">if</span>(!f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2036_3">seek</a> (0, origin)) +00131 { +00132 <span class="keywordflow">throw</span> ESeekFailed(); +00133 } +00134 +00135 <span class="comment">// Reading header, </span> +00136 <span class="comment">// To make sure that the bitmap is TGA, we check imageType and imageDepth.</span> +00137 <a class="code" href="a04558.html#a7">uint8</a> lengthID; +00138 <a class="code" href="a04558.html#a7">uint8</a> cMapType; +00139 <a class="code" href="a04558.html#a7">uint8</a> imageType; +00140 <a class="code" href="a04558.html#a9">uint16</a> tgaOrigin; +00141 <a class="code" href="a04558.html#a9">uint16</a> length; +00142 <a class="code" href="a04558.html#a7">uint8</a> <a class="code" href="a04223.html#a634">depth</a>; +00143 <a class="code" href="a04558.html#a9">uint16</a> xOrg; +00144 <a class="code" href="a04558.html#a9">uint16</a> yOrg; +00145 <a class="code" href="a04558.html#a9">uint16</a> <a class="code" href="a04223.html#a632">width</a>; +00146 <a class="code" href="a04558.html#a9">uint16</a> <a class="code" href="a04223.html#a633">height</a>; +00147 <a class="code" href="a04558.html#a7">uint8</a> imageDepth; +00148 <a class="code" href="a04558.html#a7">uint8</a> desc; +00149 +00150 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(lengthID); +00151 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(cMapType); +00152 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(imageType); +00153 <span class="keywordflow">if</span>(imageType!=2 && imageType!=3 && imageType!=10 && imageType!=11) <span class="keywordflow">return</span> 0; +00154 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(tgaOrigin); +00155 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(length); +00156 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(depth); +00157 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(xOrg); +00158 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(yOrg); +00159 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(width); +00160 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(height); +00161 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(imageDepth); +00162 <span class="keywordflow">if</span>(imageDepth!=8 && imageDepth!=16 && imageDepth!=24 && imageDepth!=32) <span class="keywordflow">return</span> 0; +00163 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(desc); +00164 +00165 <span class="keywordflow">if</span>(!f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2036_3">seek</a> (0, origin)) +00166 { +00167 <span class="keywordflow">throw</span> ESeekFailed(); +00168 } +00169 <span class="preprocessor">#ifdef NEL_ALL_BITMAP_WHITE</span> +00170 <span class="preprocessor"></span> <a class="code" href="a04558.html#a7">uint8</a> result = <a class="code" href="a02268.html#NLMISC_1_1CBitmapd7">readTGA</a>(f); +00171 MakeWhite (*<span class="keyword">this</span>); +00172 <span class="keywordflow">return</span> result; +00173 <span class="preprocessor">#else // NEL_ALL_BITMAP_WHITE</span> +00174 <span class="preprocessor"></span> <span class="keywordflow">return</span> <a class="code" href="a02268.html#NLMISC_1_1CBitmapd7">readTGA</a>(f); +00175 <span class="preprocessor">#endif // NEL_ALL_BITMAP_WHITE</span> +00176 <span class="preprocessor"></span> +00177 } +00178 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea26" doxytag="NL3D::CTextureBump::loadGrayscaleAsAlpha" ></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 NLMISC::CBitmap::loadGrayscaleAsAlpha </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>loadAsAlpha</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Tell the bitmap to load grayscale bitmap as alpha or luminance format.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>loadAsAlpha</em> </td><td>is true to load grayscale bitmaps as alpha. false to load grayscale bitmaps as luminance. default value is true.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a05487.html#l00472">472</a> of file <a class="el" href="a05487.html">bitmap.h</a>. +<p> +References <a class="el" href="a05487.html#l00094">NLMISC::CBitmap::_LoadGrayscaleAsAlpha</a>. +<p> +Referenced by <a class="el" href="a06521.html#l00041">NL3D::CTextureFile::buildBitmapFromFile()</a>, and <a class="el" href="a06536.html#l00442">NL3D::CTileBank::getTileNoiseMap()</a>. +<p> +<div class="fragment"><pre>00473 { +00474 <a class="code" href="a02268.html#NL3D_1_1ITexturep2">_LoadGrayscaleAsAlpha</a>=loadAsAlpha; +00475 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturee0" doxytag="NL3D::CTextureBump::loadSize" ></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 NLMISC::CBitmap::loadSize </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const std::string & </td> + <td class="mdname" nowrap> <em>path</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> & </td> + <td class="mdname" nowrap> <em>retWidth</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> & </td> + <td class="mdname" nowrap> <em>retHeight</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [static, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +same than other <a class="el" href="a02268.html#NL3D_1_1ITexturee1">loadSize()</a>, but with a pathName. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a02268.html#NL3D_1_1ITexturee1">loadSize()</a></dd></dl> + +<p> +Definition at line <a class="el" href="a05486.html#l02671">2671</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05486.html#l02582">NLMISC::CBitmap::loadSize()</a>, <a class="el" href="a05708.html#l00135">NLMISC::CIFile::open()</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +<div class="fragment"><pre>02672 { +02673 retWidth= 0; +02674 retHeight= 0; +02675 +02676 <a class="code" href="a02653.html">CIFile</a> f(path); +02677 <span class="keywordflow">if</span>(f.<a class="code" href="a02653.html#NLMISC_1_1CIFilea12">open</a>(path)) +02678 <a class="code" href="a02268.html#NL3D_1_1ITexturee1">loadSize</a>(f, retWidth, retHeight); +02679 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturee1" doxytag="NL3D::CTextureBump::loadSize" ></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 NLMISC::CBitmap::loadSize </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> & </td> + <td class="mdname" nowrap> <em>f</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> & </td> + <td class="mdname" nowrap> <em>width</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> & </td> + <td class="mdname" nowrap> <em>height</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [static, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Determinate the bitmap size from a bitmap(TGA or DDS) from an <a class="el" href="a02270.html">IStream</a>. load just header of the file. Bitmap supported are DDS (DXTC1, DXTC1 with Alpha, DXTC3, DXTC5, and uncompressed TGA (24 and 32 bits). NB: at the end, f is seeked to begin. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>IStream</em> </td><td>The stream must be in reading mode. </td></tr> + <tr><td valign=top><em>width</em> </td><td>the width of the image. 0 if fails. </td></tr> + <tr><td valign=top><em>height</em> </td><td>the height of the image. 0 if fails. </td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>ESeekFailed</em> </td><td>: seek has failed</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a05486.html#l02582">2582</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05487.html#l00059">NLMISC::DDS</a>, <a class="el" href="a05487.html#l00064">DDSD_LINEARSIZE</a>, <a class="el" href="a05646.html#l01013">depth</a>, <a class="el" href="a05646.html#l01013">height</a>, <a class="el" href="a06463.html#l00064">NLMISC::IStream::isReading()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06461.html#l00401">NLMISC::IStream::seek()</a>, <a class="el" href="a06462.html#l00232">NLMISC::IStream::serial()</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a05981.html#l00096">uint8</a>, and <a class="el" href="a05646.html#l01013">width</a>. +<p> +Referenced by <a class="el" href="a05486.html#l02671">NLMISC::CBitmap::loadSize()</a>. +<p> +<div class="fragment"><pre>02583 { +02584 retWidth= 0; +02585 retHeight= 0; +02586 +02587 +02588 <a class="code" href="a04199.html#a6">nlassert</a>(f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>()); +02589 +02590 <span class="comment">// testing if DDS</span> +02591 <a class="code" href="a04558.html#a11">uint32</a> fileType = 0; +02592 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(fileType); +02593 <span class="keywordflow">if</span>(fileType == <a class="code" href="a05378.html#a41">DDS</a>) +02594 { +02595 <span class="comment">// read entire DDS header.</span> +02596 <a class="code" href="a04558.html#a11">uint32</a> <a class="code" href="a04223.html#a587">size</a> = 0; +02597 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(size); <span class="comment">// size in Bytes of header(without "DDS")</span> +02598 <a class="code" href="a04558.html#a11">uint32</a> * _DDSSurfaceDesc = <span class="keyword">new</span> <a class="code" href="a04558.html#a11">uint32</a>[<a class="code" href="a04223.html#a587">size</a>]; +02599 std::auto_ptr<uint32> _DDSSurfaceDescAuto(_DDSSurfaceDesc); +02600 _DDSSurfaceDesc[0]= <a class="code" href="a04223.html#a587">size</a>; +02601 +02602 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i= 0; i<<a class="code" href="a04223.html#a587">size</a>/4 - 1; i++) +02603 { +02604 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(_DDSSurfaceDesc[i+1]); +02605 } +02606 +02607 <span class="comment">// flags determines which members of the header structure contain valid data</span> +02608 <a class="code" href="a04558.html#a11">uint32</a> flags = _DDSSurfaceDesc[1]; +02609 +02610 <span class="comment">//verify if file have linearsize set</span> +02611 <span class="keywordflow">if</span>(!(flags & <a class="code" href="a04064.html#a1">DDSD_LINEARSIZE</a>)) +02612 { +02613 <span class="keywordflow">throw</span> EDDSBadHeader(); +02614 } +02615 +02616 <span class="comment">//-------------- extracting and testing useful info</span> +02617 retHeight = _DDSSurfaceDesc[2]; +02618 retWidth = _DDSSurfaceDesc[3]; +02619 } +02620 <span class="comment">// assuming it's TGA</span> +02621 <span class="keywordflow">else</span> +02622 { +02623 <span class="keywordflow">if</span>(!f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2036_3">seek</a> (0, NLMISC::IStream::begin)) +02624 { +02625 <span class="keywordflow">throw</span> ESeekFailed(); +02626 } +02627 +02628 <span class="comment">// Reading header, </span> +02629 <span class="comment">// To make sure that the bitmap is TGA, we check imageType and imageDepth.</span> +02630 <a class="code" href="a04558.html#a7">uint8</a> lengthID; +02631 <a class="code" href="a04558.html#a7">uint8</a> cMapType; +02632 <a class="code" href="a04558.html#a7">uint8</a> imageType; +02633 <a class="code" href="a04558.html#a9">uint16</a> tgaOrigin; +02634 <a class="code" href="a04558.html#a9">uint16</a> length; +02635 <a class="code" href="a04558.html#a7">uint8</a> <a class="code" href="a04223.html#a634">depth</a>; +02636 <a class="code" href="a04558.html#a9">uint16</a> xOrg; +02637 <a class="code" href="a04558.html#a9">uint16</a> yOrg; +02638 <a class="code" href="a04558.html#a9">uint16</a> <a class="code" href="a04223.html#a632">width</a>; +02639 <a class="code" href="a04558.html#a9">uint16</a> <a class="code" href="a04223.html#a633">height</a>; +02640 <a class="code" href="a04558.html#a7">uint8</a> imageDepth; +02641 <a class="code" href="a04558.html#a7">uint8</a> desc; +02642 +02643 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(lengthID); +02644 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(cMapType); +02645 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(imageType); +02646 <span class="keywordflow">if</span>(imageType!=2 && imageType!=3 && imageType!=10 && imageType!=11) <span class="keywordflow">return</span>; +02647 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(tgaOrigin); +02648 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(length); +02649 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(depth); +02650 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(xOrg); +02651 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(yOrg); +02652 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(width); +02653 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(height); +02654 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(imageDepth); +02655 <span class="keywordflow">if</span>(imageDepth!=8 && imageDepth!=24 && imageDepth!=32) <span class="keywordflow">return</span>; +02656 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(desc); +02657 +02658 <span class="comment">// Ok, we have width and height.</span> +02659 retWidth= <a class="code" href="a04223.html#a632">width</a>; +02660 retHeight= <a class="code" href="a04223.html#a633">height</a>; +02661 } +02662 +02663 <span class="comment">// reset stream.</span> +02664 <span class="keywordflow">if</span>(!f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2036_3">seek</a> (0, NLMISC::IStream::begin)) +02665 { +02666 <span class="keywordflow">throw</span> ESeekFailed(); +02667 } +02668 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea27" doxytag="NL3D::CTextureBump::makeDummy" ></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 NLMISC::CBitmap::makeDummy </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> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Make a dummy "?" texture. Usefull for file not found. Mode is rgba. +<p> +Definition at line <a class="el" href="a05486.html#l00184">184</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05487.html#l00093">NLMISC::CBitmap::_MipMapCount</a>, <a class="el" href="a06116.html#l00195">NLMISC::CObjectVector< uint8 >::getPtr()</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector< uint8 >::resize()</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">NLMISC::CBitmap::RGBA</a>, <a class="el" href="a06339.html#l00066">NLMISC::CRGBA::set()</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +Referenced by <a class="el" href="a06521.html#l00041">NL3D::CTextureFile::buildBitmapFromFile()</a>, <a class="el" href="a06250.html#l00092">NL3D::CreateDummyMesh()</a>, <a class="el" href="a06529.html#l00077">NL3D::CTextureMultiFile::doGenerate()</a>, <a class="el" href="a06527.html#l00045">NL3D::CTextureMem::doGenerate()</a>, <a class="el" href="a06525.html#l00178">NL3D::CTextureGrouped::doGenerate()</a>, <a class="el" href="a06517.html#l00101">NL3D::CTextureEmboss::doGenerate()</a>, <a class="el" href="a06511.html#l00277">doGenerate()</a>, and <a class="el" href="a06509.html#l00102">NL3D::CTextureBlend::doGenerate()</a>. +<p> +<div class="fragment"><pre>00185 { +00186 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="a04558.html#a7">uint8</a> bitmap[1024]= { +00187 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +00188 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0, +00189 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00190 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00191 0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0, +00192 0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0, +00193 0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0, +00194 0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0, +00195 0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0, +00196 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00197 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00198 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00199 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00200 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00201 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00202 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +00203 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +00204 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0, +00205 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00206 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00207 0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0, +00208 0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0, +00209 0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0, +00210 0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0, +00211 0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0, +00212 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00213 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00214 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00215 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00216 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00217 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, +00218 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +00219 }; +00220 +00221 <a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> = <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>; +00222 <a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a> = 1; +00223 <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>= 32; +00224 <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>= 32; +00225 <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0].resize(_Width*_Height*<span class="keyword">sizeof</span>(<a class="code" href="a03337.html">NLMISC::CRGBA</a>)); +00226 <a class="code" href="a03337.html">NLMISC::CRGBA</a> *pix= (<a class="code" href="a03337.html">NLMISC::CRGBA</a>*)(<a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0].getPtr()); +00227 +00228 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=0;i<(<a class="code" href="a04558.html#a14">sint</a>)(<a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>*<a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>);i++) +00229 { +00230 <span class="keywordflow">if</span>(bitmap[i]) +00231 pix[i].<a class="code" href="a03337.html#NLMISC_1_1CRGBAa14">set</a>(255,255,255,255); +00232 <span class="keywordflow">else</span> +00233 pix[i].<a class="code" href="a03337.html#NLMISC_1_1CRGBAa14">set</a>(0x80,0x80,0x80,0x40); +00234 } +00235 +00236 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturez981_5" doxytag="NL3D::CTextureBump::mipMapOff" ></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 NL3D::ITexture::mipMapOff </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06506.html#l00216">216</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00409">NL3D::ITexture::_MinFilter</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew13">NL3D::ITexture::LinearMipMapOff</a>, and <a class="el" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew21">NL3D::ITexture::NearestMipMapOff</a>. +<p> +Referenced by <a class="el" href="a06506.html#l00217">NL3D::ITexture::mipMapOn()</a>, and <a class="el" href="a06505.html#l00100">NL3D::ITexture::setFilterMode()</a>. +<p> +<div class="fragment"><pre>00216 {<span class="keywordflow">return</span> _MinFilter==<a class="code" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew21">NearestMipMapOff</a> || _MinFilter==<a class="code" href="a03487.html#NL3D_1_1ITexturew30NL3D_1_1ITexturew13">LinearMipMapOff</a>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturez981_6" doxytag="NL3D::CTextureBump::mipMapOn" ></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 NL3D::ITexture::mipMapOn </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06506.html#l00217">217</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00216">NL3D::ITexture::mipMapOff()</a>. +<p> +Referenced by <a class="el" href="a05639.html#l00277">NL3D::IDriver::getTextureShareName()</a>, <a class="el" href="a06378.html#l00308">NL3D::CShapeBank::processWSUploadTexture()</a>, <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>, and <a class="el" href="a05652.html#l00807">NL3D::CDriverGL::uploadTexture()</a>. +<p> +<div class="fragment"><pre>00217 {<span class="keywordflow">return</span> !<a class="code" href="a03487.html#NL3D_1_1ITexturez981_5">mipMapOff</a>();} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa38" doxytag="NL3D::CTextureBump::NLMISC_DECLARE_CLASS" ></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::CTextureBump::NLMISC_DECLARE_CLASS </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03489.html">CTextureBump</a> </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa39" doxytag="NL3D::CTextureBump::release" ></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::CTextureBump::release </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> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +============================================================================================== +<p> + +<p> +Reimplemented from <a class="el" href="a03487.html#NL3D_1_1ITexturea28">NL3D::ITexture</a>. +<p> +Definition at line <a class="el" href="a06511.html#l00354">354</a> of file <a class="el" href="a06511.html">texture_bump.cpp</a>. +<p> +References <a class="el" href="a06512.html#l00103">_HeightMap</a>. +<p> +Referenced by <a class="el" href="a06511.html#l00382">getNormalizationFactor()</a>, and <a class="el" href="a06257.html#l00733">NL3D::CPSMultiTexturedParticle::setupMaterial()</a>. +<p> +<div class="fragment"><pre>00355 { +00356 ITexture::release(); +00357 <span class="keywordflow">if</span> (<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a> != NULL) +00358 { +00359 <span class="keywordflow">if</span> (<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->getReleasable()) +00360 { +00361 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->release(); +00362 } +00363 } +00364 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea29" doxytag="NL3D::CTextureBump::releaseDriverSetup" ></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::ITexture::releaseDriverSetup </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> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Release the Driver info for this texture (if any). Call it with care. +<p> + +<p> +Definition at line <a class="el" href="a06505.html#l00064">64</a> of file <a class="el" href="a06505.html">texture.cpp</a>. +<p> +References <a class="el" href="a03321.html#NLMISC_1_1CRefPtra3">NLMISC::CRefPtr< CTextureDrvShare >::kill()</a>, and <a class="el" href="a06506.html#l00416">NL3D::ITexture::TextureDrvShare</a>. +<p> +Referenced by <a class="el" href="a05993.html#l00507">NL3D::CMeshBaseInstance::isAsyncTextureReady()</a>, and <a class="el" href="a06505.html#l00056">NL3D::ITexture::~ITexture()</a>. +<p> +<div class="fragment"><pre>00065 { +00066 <span class="comment">// Must kill the drv mirror of this texture.</span> +00067 <a class="code" href="a03487.html#NL3D_1_1ITextureo4">TextureDrvShare</a>.<a class="code" href="a03321.html#NLMISC_1_1CRefPtra3">kill</a>(); +00068 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea30" doxytag="NL3D::CTextureBump::releaseMipMaps" ></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 NLMISC::CBitmap::releaseMipMaps </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> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Release the mipmaps of the bitmap if they exist. Work for any mode. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a02268.html#NL3D_1_1ITexturea3">buildMipMaps()</a>.</dd></dl> + +<p> +Definition at line <a class="el" href="a05486.html#l01493">1493</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05487.html#l00093">NLMISC::CBitmap::_MipMapCount</a>, <a class="el" href="a05587.html#l00141">NLMISC::contReset()</a>, <a class="el" href="a05487.html#l00070">NLMISC::MAX_MIPMAP</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +Referenced by <a class="el" href="a05463.html#l00059">NL3D::CAsyncTextureManager::CTextureEntry::createCoarseBitmap()</a>, <a class="el" href="a06517.html#l00101">NL3D::CTextureEmboss::doGenerate()</a>, <a class="el" href="a06511.html#l00277">doGenerate()</a>, <a class="el" href="a05486.html#l02682">NLMISC::CBitmap::flipH()</a>, <a class="el" href="a05486.html#l02714">NLMISC::CBitmap::flipV()</a>, <a class="el" href="a05486.html#l01508">NLMISC::CBitmap::resample()</a>, <a class="el" href="a05486.html#l01545">NLMISC::CBitmap::resize()</a>, <a class="el" href="a05486.html#l02781">NLMISC::CBitmap::rot90CCW()</a>, <a class="el" href="a05486.html#l02746">NLMISC::CBitmap::rot90CW()</a>, and <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>. +<p> +<div class="fragment"><pre>01494 { +01495 <span class="keywordflow">if</span>(<a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a><=1) <span class="keywordflow">return</span>; +01496 +01497 <a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>=1; +01498 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a14">sint</a> i=1;i<<a class="code" href="a05378.html#a43">MAX_MIPMAP</a>;i++) +01499 { +01500 <a class="code" href="a05378.html#a381">NLMISC::contReset</a>(_Data[i]); +01501 } +01502 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea31" doxytag="NL3D::CTextureBump::resample" ></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 NLMISC::CBitmap::resample </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a10">sint32</a> </td> + <td class="mdname" nowrap> <em>nNewWidth</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a10">sint32</a> </td> + <td class="mdname" nowrap> <em>nNewHeight</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Resample the bitmap. If mipmaps exist they are deleted, then rebuilt after resampling. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>nNewWidth</em> </td><td>width after resample </td></tr> + <tr><td valign=top><em>nNewHeight</em> </td><td>height after resample</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a05486.html#l01508">1508</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05487.html#l00093">NLMISC::CBitmap::_MipMapCount</a>, <a class="el" href="a05486.html#l01422">NLMISC::CBitmap::buildMipMaps()</a>, <a class="el" href="a05587.html#l00141">NLMISC::contReset()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a05486.html#l01493">NLMISC::CBitmap::releaseMipMaps()</a>, <a class="el" href="a05486.html#l01618">NLMISC::CBitmap::resamplePicture32()</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector< T, EnableObjectBehavior >::resize()</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">NLMISC::CBitmap::RGBA</a>, and <a class="el" href="a05981.html#l00099">sint32</a>. +<p> +Referenced by <a class="el" href="a05567.html#l00070">NL3D::CCoarseMeshBuild::buildBitmap()</a>, and <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>. +<p> +<div class="fragment"><pre>01509 { +01510 <a class="code" href="a04199.html#a6">nlassert</a>(PixelFormat == RGBA); +01511 <span class="keywordtype">bool</span> needRebuild = <span class="keyword">false</span>; +01512 +01513 <span class="comment">// Deleting mipmaps</span> +01514 <span class="keywordflow">if</span>(<a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>>1) +01515 needRebuild = <span class="keyword">true</span>; +01516 <a class="code" href="a02268.html#NL3D_1_1ITexturea30">releaseMipMaps</a>(); +01517 +01518 <span class="keywordflow">if</span>(nNewWidth==0 || nNewHeight==0) +01519 { +01520 <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a> = <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a> = 0; +01521 <span class="keywordflow">return</span>; +01522 } +01523 +01524 CObjectVector<uint8> pDestui; +01525 pDestui.resize(nNewWidth*nNewHeight*4); +01526 <a class="code" href="a03337.html">NLMISC::CRGBA</a> *pDestRgba = (<a class="code" href="a03337.html">NLMISC::CRGBA</a>*)&pDestui[0]; +01527 +01528 <a class="code" href="a02268.html#NLMISC_1_1CBitmapd8">resamplePicture32</a> ((<a class="code" href="a03337.html">NLMISC::CRGBA</a>*)&_Data[0][0], pDestRgba, _Width, _Height, nNewWidth, nNewHeight); +01529 <a class="code" href="a05378.html#a381">NLMISC::contReset</a>(_Data[0]); <span class="comment">// free memory</span> +01530 <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0] = pDestui; +01531 <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>= nNewWidth; +01532 <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>= nNewHeight; +01533 +01534 <span class="comment">// Rebuilding mipmaps</span> +01535 <span class="keywordflow">if</span>(needRebuild) +01536 { +01537 <a class="code" href="a02268.html#NL3D_1_1ITexturea3">buildMipMaps</a>(); +01538 } +01539 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea32" doxytag="NL3D::CTextureBump::reset" ></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 NLMISC::CBitmap::reset </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02268.html#NL3D_1_1ITexturew31">TType</a> </td> + <td class="mdname1" valign="top" nowrap> <em>type</em> = RGBA </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Reset the buffer. Mipmaps are deleted and bitmap is not valid anymore.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>type</em> </td><td>is the new type used for this texture</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a05486.html#l01599">1599</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05487.html#l00093">NLMISC::CBitmap::_MipMapCount</a>, <a class="el" href="a05587.html#l00141">NLMISC::contReset()</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector< uint8 >::resize()</a>, <a class="el" href="a05646.html#l00244">type</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05790.html#l00337">NL3D::CHLSColorTexture::buildColorVersion()</a>, <a class="el" href="a05642.html#l02131">NL3D::CDriverGL::getBufferPart()</a>, and <a class="el" href="a06506.html#l00327">NL3D::ITexture::release()</a>. +<p> +<div class="fragment"><pre>01600 { +01601 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i<<a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>; i++) +01602 { +01603 <a class="code" href="a05378.html#a381">NLMISC::contReset</a>(_Data[i]); +01604 <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[i].resize(0); +01605 } +01606 <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a> = <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a> = 0; +01607 _MipMapCount= 1; +01608 +01609 <span class="comment">// Change pixel format</span> +01610 <a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a>=<a class="code" href="a04223.html#a581">type</a>; +01611 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea33" doxytag="NL3D::CTextureBump::resize" ></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 NLMISC::CBitmap::resize </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a10">sint32</a> </td> + <td class="mdname" nowrap> <em>nNewWidth</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a10">sint32</a> </td> + <td class="mdname" nowrap> <em>nNewHeight</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a02268.html#NL3D_1_1ITexturew31">TType</a> </td> + <td class="mdname" nowrap> <em>newType</em> = DonTKnow, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>resetTo0</em> = true</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Resize the bitmap. If mipmaps exist they are deleted and not rebuilt. This is not a crop. Pixels are lost after resize.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>nNewWidth</em> </td><td>width after resize </td></tr> + <tr><td valign=top><em>nNewHeight</em> </td><td>height after resize </td></tr> + <tr><td valign=top><em>newType</em> </td><td>is the new type of the bitmap. If don_t_know, keep the same pixel format that before. </td></tr> + <tr><td valign=top><em>resetTo0</em> </td><td>by default the vector are filled by 0. set false to gain performances.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a05486.html#l01545">1545</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew4">NLMISC::CBitmap::DonTKnow</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a05486.html#l01493">NLMISC::CBitmap::releaseMipMaps()</a>, <a class="el" href="a05486.html#l01565">NLMISC::CBitmap::resizeMipMap()</a>, and <a class="el" href="a05981.html#l00099">sint32</a>. +<p> +Referenced by <a class="el" href="a05486.html#l02817">NLMISC::CBitmap::blend()</a>, <a class="el" href="a05790.html#l00337">NL3D::CHLSColorTexture::buildColorVersion()</a>, <a class="el" href="a06523.html#l00067">NL3D::CTextureFont::CTextureFont()</a>, <a class="el" href="a06527.html#l00045">NL3D::CTextureMem::doGenerate()</a>, <a class="el" href="a06525.html#l00178">NL3D::CTextureGrouped::doGenerate()</a>, <a class="el" href="a05862.html#l00116">NL3D::CTextureCross::doGenerate()</a>, <a class="el" href="a06523.html#l00133">NL3D::CTextureFont::dumpTextureFont()</a>, <a class="el" href="a05567.html#l00367">NL3D::CCoarseMeshBuild::expand()</a>, and <a class="el" href="a05642.html#l02131">NL3D::CDriverGL::getBufferPart()</a>. +<p> +<div class="fragment"><pre>01546 { +01547 <span class="comment">// Deleting mipmaps</span> +01548 <a class="code" href="a02268.html#NL3D_1_1ITexturea30">releaseMipMaps</a>(); +01549 +01550 <span class="comment">// Change type of bitmap ?</span> +01551 <span class="keywordflow">if</span> (newType!=<a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew4">DonTKnow</a>) +01552 <a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a>=newType; +01553 +01554 <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a> = nNewWidth; +01555 <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a> = nNewHeight; +01556 +01557 <span class="comment">// resize the level 0 only.</span> +01558 <a class="code" href="a02268.html#NL3D_1_1ITexturea34">resizeMipMap</a>(0, nNewWidth, nNewHeight, resetTo0); +01559 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea34" doxytag="NL3D::CTextureBump::resizeMipMap" ></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 NLMISC::CBitmap::resizeMipMap </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname" nowrap> <em>numMipMap</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a10">sint32</a> </td> + <td class="mdname" nowrap> <em>nNewWidth</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a10">sint32</a> </td> + <td class="mdname" nowrap> <em>nNewHeight</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>resetTo0</em> = true</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +ADVANCED USE Resize a single mipmap level. <a class="el" href="a02268.html#NL3D_1_1ITexturea33">resize()</a> should have been called before. This is not a crop. Pixels are lost after resize. No validity check is made. It is the user responsabitility fo setup correct mipmap size.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>numMipMap</em> </td><td>id of the mipmap </td></tr> + <tr><td valign=top><em>nNewWidth</em> </td><td>width after resize </td></tr> + <tr><td valign=top><em>nNewHeight</em> </td><td>height after resize </td></tr> + <tr><td valign=top><em>resetTo0</em> </td><td>by default the vector are filled by 0. set false to gain performances.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a05486.html#l01565">1565</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05486.html#l00070">NLMISC::CBitmap::bitPerPixels</a>, <a class="el" href="a05587.html#l00141">NLMISC::contReset()</a>, <a class="el" href="a06116.html#l00231">NLMISC::CObjectVector< uint8 >::fill()</a>, <a class="el" href="a05487.html#l00070">NLMISC::MAX_MIPMAP</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector< uint8 >::resize()</a>, <a class="el" href="a05981.html#l00099">sint32</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +Referenced by <a class="el" href="a05790.html#l00337">NL3D::CHLSColorTexture::buildColorVersion()</a>, and <a class="el" href="a05486.html#l01545">NLMISC::CBitmap::resize()</a>. +<p> +<div class="fragment"><pre>01566 { +01567 <a class="code" href="a04199.html#a6">nlassert</a>(numMipMap<MAX_MIPMAP); +01568 +01569 <span class="comment">// free memory</span> +01570 <a class="code" href="a05378.html#a381">NLMISC::contReset</a>(_Data[numMipMap]); +01571 +01572 <span class="comment">// DXTC compressed??</span> +01573 <span class="comment">//bool isDXTC= PixelFormat==DXTC1 || PixelFormat==DXTC1Alpha || PixelFormat==DXTC3 || PixelFormat==DXTC5;</span> +01574 <span class="comment">// if yes, must round up width and height to 4, for allocation</span> +01575 nNewWidth= 4*((nNewWidth+3)/4); +01576 nNewHeight= 4*((nNewHeight+3)/4); +01577 +01578 <span class="comment">// resize the buffer</span> +01579 <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[numMipMap].resize (((<a class="code" href="a04558.html#a11">uint32</a>)(nNewWidth*nNewHeight)*bitPerPixels[PixelFormat])/8); +01580 +01581 <span class="comment">// Fill 0?</span> +01582 <span class="keywordflow">if</span>( resetTo0 ) +01583 <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[numMipMap].fill(0); +01584 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea35" doxytag="NL3D::CTextureBump::rot90CCW" ></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 NLMISC::CBitmap::rot90CCW </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> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Rotation of the bitmap of 90 degree in counter clockwise +<p> +Definition at line <a class="el" href="a05486.html#l02781">2781</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05487.html#l00093">NLMISC::CBitmap::_MipMapCount</a>, <a class="el" href="a05486.html#l01422">NLMISC::CBitmap::buildMipMaps()</a>, <a class="el" href="a05587.html#l00141">NLMISC::contReset()</a>, <a class="el" href="a05486.html#l01388">NLMISC::CBitmap::getHeight()</a>, <a class="el" href="a05486.html#l01363">NLMISC::CBitmap::getWidth()</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a05486.html#l01493">NLMISC::CBitmap::releaseMipMaps()</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector< T, EnableObjectBehavior >::resize()</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">NLMISC::CBitmap::RGBA</a>, <a class="el" href="a05981.html#l00099">sint32</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +<div class="fragment"><pre>02782 { +02783 <span class="keywordflow">if</span> (<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> != <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>) +02784 <span class="keywordflow">return</span>; +02785 <a class="code" href="a04558.html#a10">sint32</a> nWidth = <a class="code" href="a02268.html#NL3D_1_1ITexturea20">getWidth</a>(0); +02786 <a class="code" href="a04558.html#a10">sint32</a> nHeight = <a class="code" href="a02268.html#NL3D_1_1ITexturea12">getHeight</a>(0); +02787 <a class="code" href="a04558.html#a10">sint32</a> i, j; +02788 <a class="code" href="a03337.html">NLMISC::CRGBA</a> *pSrcRgba = (<a class="code" href="a03337.html">NLMISC::CRGBA</a>*)&<a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0][0]; +02789 <span class="keywordtype">bool</span> needRebuild = <span class="keyword">false</span>; +02790 +02791 <span class="keywordflow">if</span>(<a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>>1) +02792 needRebuild = <span class="keyword">true</span>; +02793 <a class="code" href="a02268.html#NL3D_1_1ITexturea30">releaseMipMaps</a>(); +02794 +02795 CObjectVector<uint8> pDestui; +02796 pDestui.resize(nWidth*nHeight*4); +02797 <a class="code" href="a03337.html">NLMISC::CRGBA</a> *pDestRgba = (<a class="code" href="a03337.html">NLMISC::CRGBA</a>*)&pDestui[0]; +02798 +02799 <span class="keywordflow">for</span>( j = 0; j < nHeight; ++j ) +02800 <span class="keywordflow">for</span>( i = 0; i < nWidth; ++i ) +02801 pDestRgba[j+i*nHeight] = pSrcRgba[nWidth-1-i+j*nWidth]; +02802 +02803 <a class="code" href="a04558.html#a11">uint32</a> nTemp = <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>; +02804 _Width = <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>; +02805 _Height = nTemp; +02806 +02807 <a class="code" href="a05378.html#a381">NLMISC::contReset</a>(_Data[0]); <span class="comment">// free memory</span> +02808 <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0] = pDestui; +02809 <span class="comment">// Rebuilding mipmaps</span> +02810 <span class="keywordflow">if</span>(needRebuild) +02811 { +02812 <a class="code" href="a02268.html#NL3D_1_1ITexturea3">buildMipMaps</a>(); +02813 } +02814 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea36" doxytag="NL3D::CTextureBump::rot90CW" ></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 NLMISC::CBitmap::rot90CW </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> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Rotation of the bitmap of 90 degree in clockwise +<p> +Definition at line <a class="el" href="a05486.html#l02746">2746</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05487.html#l00093">NLMISC::CBitmap::_MipMapCount</a>, <a class="el" href="a05486.html#l01422">NLMISC::CBitmap::buildMipMaps()</a>, <a class="el" href="a05587.html#l00141">NLMISC::contReset()</a>, <a class="el" href="a05486.html#l01388">NLMISC::CBitmap::getHeight()</a>, <a class="el" href="a05486.html#l01363">NLMISC::CBitmap::getWidth()</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a05486.html#l01493">NLMISC::CBitmap::releaseMipMaps()</a>, <a class="el" href="a06116.html#l00142">NLMISC::CObjectVector< T, EnableObjectBehavior >::resize()</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">NLMISC::CBitmap::RGBA</a>, <a class="el" href="a05981.html#l00099">sint32</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +<div class="fragment"><pre>02747 { +02748 <span class="keywordflow">if</span> (<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> != <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>) +02749 <span class="keywordflow">return</span>; +02750 <a class="code" href="a04558.html#a10">sint32</a> nWidth = <a class="code" href="a02268.html#NL3D_1_1ITexturea20">getWidth</a>(0); +02751 <a class="code" href="a04558.html#a10">sint32</a> nHeight = <a class="code" href="a02268.html#NL3D_1_1ITexturea12">getHeight</a>(0); +02752 <a class="code" href="a04558.html#a10">sint32</a> i, j; +02753 <a class="code" href="a03337.html">NLMISC::CRGBA</a> *pSrcRgba = (<a class="code" href="a03337.html">NLMISC::CRGBA</a>*)&<a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0][0]; +02754 <span class="keywordtype">bool</span> needRebuild = <span class="keyword">false</span>; +02755 +02756 <span class="keywordflow">if</span>(<a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>>1) +02757 needRebuild = <span class="keyword">true</span>; +02758 <a class="code" href="a02268.html#NL3D_1_1ITexturea30">releaseMipMaps</a>(); +02759 +02760 CObjectVector<uint8> pDestui; +02761 pDestui.resize(nWidth*nHeight*4); +02762 <a class="code" href="a03337.html">NLMISC::CRGBA</a> *pDestRgba = (<a class="code" href="a03337.html">NLMISC::CRGBA</a>*)&pDestui[0]; +02763 +02764 <span class="keywordflow">for</span>( j = 0; j < nHeight; ++j ) +02765 <span class="keywordflow">for</span>( i = 0; i < nWidth; ++i ) +02766 pDestRgba[j+i*nHeight] = pSrcRgba[i+(nHeight-1-j)*nWidth]; +02767 +02768 <a class="code" href="a04558.html#a11">uint32</a> nTemp = <a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>; +02769 _Width = <a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>; +02770 _Height = nTemp; +02771 +02772 <a class="code" href="a05378.html#a381">NLMISC::contReset</a>(_Data[0]); <span class="comment">// free memory</span> +02773 <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0] = pDestui; +02774 <span class="comment">// Rebuilding mipmaps</span> +02775 <span class="keywordflow">if</span>(needRebuild) +02776 { +02777 <a class="code" href="a02268.html#NL3D_1_1ITexturea3">buildMipMaps</a>(); +02778 } +02779 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea37" doxytag="NL3D::CTextureBump::rotateCCW" ></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 NLMISC::CBitmap::rotateCCW </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> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Rotate a bitmap in CCW mode.<p> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a02268.html#NL3D_1_1ITexturea30">releaseMipMaps()</a>.</dd></dl> + +<p> +Definition at line <a class="el" href="a05486.html#l02306">2306</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">NLMISC::CBitmap::RGBA</a>, <a class="el" href="a05486.html#l02283">NLMISC::rotateCCW()</a>, <a class="el" href="a05981.html#l00098">uint16</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +<div class="fragment"><pre>02307 { +02308 <span class="comment">// Copy the array</span> +02309 CObjectVector<uint8> copy=<a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0]; +02310 +02311 <span class="keywordflow">switch</span> (<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a>) +02312 { +02313 <span class="keywordflow">case</span> <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>: +02314 <a class="code" href="a05378.html#a254">NLMISC::rotateCCW</a> ((<a class="code" href="a04558.html#a11">uint32</a>*)&(_Data[0][0]), (<a class="code" href="a04558.html#a11">uint32</a>*)&(copy[0]), _Width, _Height); +02315 <span class="keywordflow">break</span>; +02316 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew14">Luminance</a>: +02317 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew0">Alpha</a>: +02318 <a class="code" href="a05378.html#a254">NLMISC::rotateCCW</a> (&_Data[0][0], &copy[0], _Width, _Height); +02319 <span class="keywordflow">break</span>; +02320 <span class="keywordflow">case</span> <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew1">AlphaLuminance</a>: +02321 <a class="code" href="a05378.html#a254">NLMISC::rotateCCW</a> ((<a class="code" href="a04558.html#a9">uint16</a>*)&(_Data[0][0]), (<a class="code" href="a04558.html#a9">uint16</a>*)&(copy[0]), _Width, _Height);; +02322 <span class="keywordflow">break</span>; +02323 <span class="keywordflow">default</span>: <span class="keywordflow">break</span>; +02324 } +02325 +02326 <a class="code" href="a04558.html#a11">uint32</a> tmp=<a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>; +02327 _Width=<a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>; +02328 _Height=tmp; +02329 _Data[0]=copy; +02330 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea38" doxytag="NL3D::CTextureBump::selectTexture" ></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"> virtual void NL3D::ITexture::selectTexture </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>index</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Select a texture among several other (if this texture is a set of texture such as <a class="el" href="a03512.html">CTextureMultiFile</a>) The default does nothing +<p> +Reimplemented in <a class="el" href="a03492.html#NL3D_1_1CTextureCubea44">NL3D::CTextureCube</a>, and <a class="el" href="a03512.html#NL3D_1_1CTextureMultiFilea43">NL3D::CTextureMultiFile</a>. +<p> +Definition at line <a class="el" href="a06506.html#l00360">360</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a05646.html#l00225">index</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05567.html#l00070">NL3D::CCoarseMeshBuild::buildBitmap()</a>, <a class="el" href="a05567.html#l00430">NL3D::CCoarseMeshBuild::remapCoordinates()</a>, and <a class="el" href="a05457.html#l00231">NL3D::CAsyncFileManager3D::CMeshLoad::run()</a>. +<p> +<div class="fragment"><pre>00360 {} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa50" doxytag="NL3D::CTextureBump::serial" ></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::CTextureBump::serial </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>f</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> throw (<a class="el" href="a03781.html">NLMISC::EStream</a>)<code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +============================================================================================== +<p> +version 2 : normalization flag +<p> +Reimplemented from <a class="el" href="a03487.html#NL3D_1_1ITexturea39">NL3D::ITexture</a>. +<p> +Definition at line <a class="el" href="a06511.html#l00248">248</a> of file <a class="el" href="a06511.html">texture_bump.cpp</a>. +<p> +References <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>00249 { +00251 <a class="code" href="a04558.html#a14">sint</a> ver = f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_8">serialVersion</a>(3); +00252 ITexture::serial(f); +00253 <a class="code" href="a03487.html#NL3D_1_1ITexturez979_1">ITexture</a> *tex = NULL; +00254 <span class="keywordflow">if</span> (f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>()) +00255 { +00256 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_6">serialPolyPtr</a>(tex); +00257 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a> = tex; +00258 <a class="code" href="a03487.html#NL3D_1_1ITexturea44">touch</a>(); +00259 } +00260 <span class="keywordflow">else</span> +00261 { +00262 tex = <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>; +00263 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2035_6">serialPolyPtr</a>(tex); +00264 } +00265 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(_DisableSharing); +00266 <span class="keywordflow">if</span> (ver >= 1) +00267 { +00268 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(_UseAbsoluteOffsets); +00269 } +00270 <span class="keywordflow">if</span> (ver >= 2) +00271 { +00272 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(_ForceNormalize); +00273 } +00274 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa51" doxytag="NL3D::CTextureBump::setAbsoluteOffsets" ></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::CTextureBump::setAbsoluteOffsets </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>use</em> = true </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> +deprecated : absolute offsets are taken from the gradient of the height map +<p> + +<p> +Definition at line <a class="el" href="a06512.html#l00070">70</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +References <a class="el" href="a06512.html#l00106">_UseAbsoluteOffsets</a>. +<p> +Referenced by <a class="el" href="a06257.html#l00850">NL3D::ConvertToBumpMap()</a>. +<p> +<div class="fragment"><pre>00070 { <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp11">_UseAbsoluteOffsets</a> = <span class="keyword">true</span>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpd0" doxytag="NL3D::CTextureBump::setFilterMode" ></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::CTextureBump::setFilterMode </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03487.html#NL3D_1_1ITexturew29">TMagFilter</a> </td> + <td class="mdname" nowrap> <em>magf</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03487.html#NL3D_1_1ITexturew30">TMinFilter</a> </td> + <td class="mdname" nowrap> <em>minf</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [private, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +============================================================================================== +<p> + +<p> +Reimplemented from <a class="el" href="a03487.html#NL3D_1_1ITexturez981_7">NL3D::ITexture</a>. +<p> +Definition at line <a class="el" href="a06511.html#l00232">232</a> of file <a class="el" href="a06511.html">texture_bump.cpp</a>. +<p> +References <a class="el" href="a05622.html#l00416">nlstop</a>. +<p> +<div class="fragment"><pre>00233 { +00234 <a class="code" href="a04199.html#a12">nlstop</a>; <span class="comment">// set filter mode not allowed with bump textures (not supported by some GPUs)</span> +00235 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa52" doxytag="NL3D::CTextureBump::setHeightMap" ></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::CTextureBump::setHeightMap </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03487.html">ITexture</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>heightMap</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +set the height map used to generate this bump map +<p> + +<p> +Definition at line <a class="el" href="a06511.html#l00237">237</a> of file <a class="el" href="a06511.html">texture_bump.cpp</a>. +<p> +References <a class="el" href="a06512.html#l00103">_HeightMap</a>, and <a class="el" href="a06506.html#l00227">NL3D::ITexture::touch()</a>. +<p> +Referenced by <a class="el" href="a06257.html#l00850">NL3D::ConvertToBumpMap()</a>. +<p> +<div class="fragment"><pre>00238 { +00239 <span class="keywordflow">if</span> (heightMap != <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>) +00240 { +00241 <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a> = heightMap; +00242 <a class="code" href="a03487.html#NL3D_1_1ITexturea44">touch</a>(); +00243 } +00244 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea40" doxytag="NL3D::CTextureBump::setMipMapCount" ></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 NLMISC::CBitmap::setMipMapCount </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname1" valign="top" nowrap> <em>mmc</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +ADVANCED USE To use in conjunction with resizeMipMap. Setup the correct total number of mipmap No validity check is made. It is the user responsabitility fo setup correct mipmap count. +<p> +Definition at line <a class="el" href="a05486.html#l01590">1590</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05487.html#l00093">NLMISC::CBitmap::_MipMapCount</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a06590.html#l00215">uint8</a>. +<p> +Referenced by <a class="el" href="a05790.html#l00337">NL3D::CHLSColorTexture::buildColorVersion()</a>. +<p> +<div class="fragment"><pre>01591 { +01592 <a class="code" href="a02268.html#NL3D_1_1ITexturep3">_MipMapCount</a>= <a class="code" href="a05167.html#a9">uint8</a>(mmc); +01593 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea41" doxytag="NL3D::CTextureBump::setReleasable" ></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::ITexture::setReleasable </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>r</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set if texture can be released If it is true, the driver will release the texture after generating it and upload it into the videomemory by calling <a class="el" href="a03487.html#NL3D_1_1ITexturea28">release()</a>. If it is false, the driver won't release the texture.<p> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03487.html#NL3D_1_1ITexturea17">getReleasable()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a> </dd></dl> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>true</em> </td><td>if texture can be released, false else</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06506.html#l00278">278</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00405">NL3D::ITexture::_Releasable</a>, and <a class="el" href="a05646.html#l00993">r</a>. +<p> +Referenced by <a class="el" href="a06372.html#l00957">NL3D::CShadowMapManager::allocateTexture()</a>, <a class="el" href="a06515.html#l00042">NL3D::CTextureDLM::CTextureDLM()</a>, <a class="el" href="a06519.html#l00048">NL3D::CTextureFar::CTextureFar()</a>, <a class="el" href="a06523.html#l00067">NL3D::CTextureFont::CTextureFont()</a>, <a class="el" href="a06531.html#l00037">NL3D::CTextureNear::CTextureNear()</a>, <a class="el" href="a06378.html#l00308">NL3D::CShapeBank::processWSUploadTexture()</a>, <a class="el" href="a06739.html#l00171">NL3D::CWaterPoolManager::releaseBlendTextures()</a>, <a class="el" href="a06739.html#l00152">NL3D::CWaterPoolManager::setBlendFactor()</a>, and <a class="el" href="a05463.html#l00451">NL3D::CAsyncTextureManager::uploadTexturePart()</a>. +<p> +<div class="fragment"><pre>00278 { _Releasable = <a class="code" href="a04223.html#a628">r</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa55" doxytag="NL3D::CTextureBump::setSignedFormat" ></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::CTextureBump::setSignedFormat </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>formatSigned</em> </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> +Use signed format or not. Default is to used signed format NB : when RGBA upload format is used, the format is never signed NB : this has effect only if the deprecated option 'setAbsoluteOffsets' is false NB : this flag is not serialized +<p> +Definition at line <a class="el" href="a06512.html#l00090">90</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +References <a class="el" href="a06512.html#l00108">_Signed</a>. +<p> +Referenced by <a class="el" href="a05648.html#l01876">NL3D::CDriverGL::setupWaterPassR200()</a>. +<p> +<div class="fragment"><pre>00090 { <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp9">_Signed</a> = formatSigned; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea42" doxytag="NL3D::CTextureBump::setupedIntoDriver" ></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 NL3D::ITexture::setupedIntoDriver </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Tells if the texture has been setuped by the driver. +<p> +Definition at line <a class="el" href="a06506.html#l00343">343</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00416">NL3D::ITexture::TextureDrvShare</a>. +<p> +<div class="fragment"><pre>00344 { +00345 <span class="keywordflow">return</span> <a class="code" href="a03487.html#NL3D_1_1ITextureo4">TextureDrvShare</a>!=NULL; +00346 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturez981_8" doxytag="NL3D::CTextureBump::setUploadFormat" ></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::ITexture::setUploadFormat </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03487.html#NL3D_1_1ITexturew32">TUploadFormat</a> </td> + <td class="mdname1" valign="top" nowrap> <em>pf</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Replace the uploaded format of the texture. If "Auto", the driver use <a class="el" href="a02268.html#NL3D_1_1ITexturea15">CBitmap::getPixelFormat()</a> to find the best associated pixelFormat. When no alpha is wanted (RGB, Luminance....), texture default output is 1.0. For "Alpha" mode, RGB output is (0,0,0). +<p> +Definition at line <a class="el" href="a06505.html#l00088">88</a> of file <a class="el" href="a06505.html">texture.cpp</a>. +<p> +References <a class="el" href="a06506.html#l00406">NL3D::ITexture::_UploadFormat</a>, and <a class="el" href="a06506.html#l00227">NL3D::ITexture::touch()</a>. +<p> +Referenced by <a class="el" href="a06515.html#l00042">NL3D::CTextureDLM::CTextureDLM()</a>, <a class="el" href="a06519.html#l00048">NL3D::CTextureFar::CTextureFar()</a>, <a class="el" href="a06523.html#l00067">NL3D::CTextureFont::CTextureFont()</a>, <a class="el" href="a06531.html#l00037">NL3D::CTextureNear::CTextureNear()</a>, <a class="el" href="a05648.html#l01266">NL3D::CDriverGL::getSpecularCubeMap()</a>, and <a class="el" href="a05648.html#l01956">NL3D::CDriverGL::setupWaterPassARB()</a>. +<p> +<div class="fragment"><pre>00089 { +00090 <span class="keywordflow">if</span>(pf!=_UploadFormat) +00091 { +00092 _UploadFormat= pf; +00093 <span class="comment">// All the texture may be reloaded...</span> +00094 <a class="code" href="a03487.html#NL3D_1_1ITexturea44">touch</a>(); +00095 } +00096 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturez981_9" doxytag="NL3D::CTextureBump::setWrapS" ></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::ITexture::setWrapS </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03487.html#NL3D_1_1ITexturew33">TWrapMode</a> </td> + <td class="mdname1" valign="top" nowrap> <em>mode</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +By default, parameters are:<ul> +<li>WrapS==Repeat</li><li>WrapT==Repeat</li><li>UploadFormat== Auto</li><li>MagFilter== Linear.</li><li>MinFilter= LinearMipMapLinear.</li></ul> +<p> +NB: if multiple <a class="el" href="a03487.html">ITexture</a> acces the same data via the sharing system (such as a <a class="el" href="a03502.html">CTextureFile</a>), then:<ul> +<li>WrapS/WrapT is LOCAL for each <a class="el" href="a03487.html">ITexture</a> (ie each <a class="el" href="a03487.html">ITexture</a> will have his own Wrap mode) => no duplication is made.</li><li>UploadFormat may duplicate the texture in video memory. There is one texture per different UploadFormat.</li><li>MinFilter may duplicate the texture in video memory in the same way, wether the texture has mipmap or not.</li></ul> + +<p> +Definition at line <a class="el" href="a06506.html#l00202">202</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00407">NL3D::ITexture::_WrapS</a>. +<p> +Referenced by <a class="el" href="a06372.html#l00957">NL3D::CShadowMapManager::allocateTexture()</a>, <a class="el" href="a06519.html#l00048">NL3D::CTextureFar::CTextureFar()</a>, <a class="el" href="a06523.html#l00067">NL3D::CTextureFont::CTextureFont()</a>, <a class="el" href="a06698.html#l01592">NL3D::CVegetableManager::loadTexture()</a>, and <a class="el" href="a06360.html#l00243">NL3D::CSegRemanenceShape::setupMaterial()</a>. +<p> +<div class="fragment"><pre>00202 {_WrapS= mode;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturez981_10" doxytag="NL3D::CTextureBump::setWrapT" ></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::ITexture::setWrapT </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03487.html#NL3D_1_1ITexturew33">TWrapMode</a> </td> + <td class="mdname1" valign="top" nowrap> <em>mode</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06506.html#l00203">203</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00408">NL3D::ITexture::_WrapT</a>. +<p> +Referenced by <a class="el" href="a06372.html#l00957">NL3D::CShadowMapManager::allocateTexture()</a>, <a class="el" href="a06519.html#l00048">NL3D::CTextureFar::CTextureFar()</a>, <a class="el" href="a06523.html#l00067">NL3D::CTextureFont::CTextureFont()</a>, and <a class="el" href="a06698.html#l01592">NL3D::CVegetableManager::loadTexture()</a>. +<p> +<div class="fragment"><pre>00203 {_WrapT= mode;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpa57" doxytag="NL3D::CTextureBump::supportSharing" ></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 NL3D::CTextureBump::supportSharing </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +============================================================================================== +<p> + +<p> +Reimplemented from <a class="el" href="a03487.html#NL3D_1_1ITexturea43">NL3D::ITexture</a>. +<p> +Definition at line <a class="el" href="a06511.html#l00368">368</a> of file <a class="el" href="a06511.html">texture_bump.cpp</a>. +<p> +References <a class="el" href="a06512.html#l00105">_DisableSharing</a>, and <a class="el" href="a06512.html#l00103">_HeightMap</a>. +<p> +Referenced by <a class="el" href="a06511.html#l00375">getShareName()</a>. +<p> +<div class="fragment"><pre>00369 { +00370 <span class="keywordflow">return</span> !<a class="code" href="a03489.html#NL3D_1_1CTextureBumpp1">_DisableSharing</a> && <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a> && <a class="code" href="a03489.html#NL3D_1_1CTextureBumpp4">_HeightMap</a>->supportSharing(); +00371 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea44" doxytag="NL3D::CTextureBump::touch" ></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::ITexture::touch </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, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +This method invalidates all the texture surface. When the driver calls generate, the texture will rebuild all the texture and the driver will update it.<p> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03487.html#NL3D_1_1ITexturea21">isAllInvalidated()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea46">touchRect()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea45">touched()</a>, <a class="el" href="a03487.html#NL3D_1_1ITextureo0">_ListInvalidRect</a></dd></dl> + +<p> +Definition at line <a class="el" href="a06506.html#l00227">227</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00404">NL3D::ITexture::_GoodGenerate</a>, and <a class="el" href="a06506.html#l00422">NL3D::ITexture::_ListInvalidRect</a>. +<p> +Referenced by <a class="el" href="a06522.html#l00066">NL3D::CTextureFile::CTextureFile()</a>, <a class="el" href="a06505.html#l00072">NL3D::ITexture::operator=()</a>, <a class="el" href="a06529.html#l00121">NL3D::CTextureMultiFile::selectTexture()</a>, <a class="el" href="a06513.html#l00198">NL3D::CTextureCube::selectTexture()</a>, <a class="el" href="a06518.html#l00065">NL3D::CTextureEmboss::setAmbient()</a>, <a class="el" href="a06509.html#l00076">NL3D::CTextureBlend::setBlendFactor()</a>, <a class="el" href="a06509.html#l00090">NL3D::CTextureBlend::setBlendTexture()</a>, <a class="el" href="a06518.html#l00066">NL3D::CTextureEmboss::setDiffuse()</a>, <a class="el" href="a06529.html#l00052">NL3D::CTextureMultiFile::setFileName()</a>, <a class="el" href="a06522.html#l00080">NL3D::CTextureFile::setFileName()</a>, <a class="el" href="a06505.html#l00100">NL3D::ITexture::setFilterMode()</a>, <a class="el" href="a06517.html#l00042">NL3D::CTextureEmboss::setHeightMap()</a>, <a class="el" href="a06511.html#l00237">setHeightMap()</a>, <a class="el" href="a06518.html#l00068">NL3D::CTextureEmboss::setLightDir()</a>, <a class="el" href="a06518.html#l00070">NL3D::CTextureEmboss::setSlopeFactor()</a>, <a class="el" href="a06525.html#l00146">NL3D::CTextureGrouped::setTextures()</a>, and <a class="el" href="a06505.html#l00088">NL3D::ITexture::setUploadFormat()</a>. +<p> +<div class="fragment"><pre>00228 { +00229 <a class="code" href="a03487.html#NL3D_1_1ITextureo0">_ListInvalidRect</a>.clear (); +00230 <a class="code" href="a03487.html#NL3D_1_1ITexturep4">_Touched</a>=<span class="keyword">true</span>; +00231 _GoodGenerate= <span class="keyword">false</span>; +00232 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea45" doxytag="NL3D::CTextureBump::touched" ></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 NL3D::ITexture::touched </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">void </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +This method return the touched flag. If it is true, the driver will call generate to rebuild the texture.<p> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03487.html#NL3D_1_1ITexturea21">isAllInvalidated()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea44">touch()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea46">touchRect()</a>, <a class="el" href="a03487.html#NL3D_1_1ITextureo0">_ListInvalidRect</a></dd></dl> + +<p> +Definition at line <a class="el" href="a06506.html#l00438">438</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +Referenced by <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>. +<p> +<div class="fragment"><pre>00439 { +00440 <span class="keywordflow">return</span> <a class="code" href="a03487.html#NL3D_1_1ITexturep4">_Touched</a>; +00441 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea46" doxytag="NL3D::CTextureBump::touchRect" ></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::ITexture::touchRect </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03319.html">NLMISC::CRect</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>rect</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +This method invalidates a rectangle of the texture surface. When the driver calls generate, the texture could rebuild only this part of texture and the driver will update only those rectangles.<p> +This method is incompatible with textures which support sharing (see class description).<p> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03487.html#NL3D_1_1ITexturea21">isAllInvalidated()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea44">touch()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea45">touched()</a>, <a class="el" href="a03487.html#NL3D_1_1ITextureo0">_ListInvalidRect</a></dd></dl> + +<p> +Definition at line <a class="el" href="a06506.html#l00242">242</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00404">NL3D::ITexture::_GoodGenerate</a>, <a class="el" href="a06506.html#l00422">NL3D::ITexture::_ListInvalidRect</a>, <a class="el" href="a06506.html#l00428">NL3D::ITexture::isAllInvalidated()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a06506.html#l00332">NL3D::ITexture::supportSharing()</a>. +<p> +Referenced by <a class="el" href="a06523.html#l00273">NL3D::CTextureFont::getLetterInfo()</a>. +<p> +<div class="fragment"><pre>00243 { +00244 <span class="comment">// The texture must not support sharing....</span> +00245 <a class="code" href="a04199.html#a6">nlassert</a>(!<a class="code" href="a03489.html#NL3D_1_1CTextureBumpa57">supportSharing</a>()); +00246 <span class="comment">// Don't invalidate the rectangle if the full texture is already invalidated.</span> +00247 <span class="keywordflow">if</span> (!<a class="code" href="a03487.html#NL3D_1_1ITexturea21">isAllInvalidated</a> ()) +00248 { +00249 <span class="comment">// Add the region to invalidate list</span> +00250 <a class="code" href="a03487.html#NL3D_1_1ITextureo0">_ListInvalidRect</a>.push_back (rect); +00251 <span class="comment">// Touch flag</span> +00252 <a class="code" href="a03487.html#NL3D_1_1ITexturep4">_Touched</a>=<span class="keyword">true</span>; +00253 } +00254 +00255 _GoodGenerate= <span class="keyword">false</span>; +00256 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea47" doxytag="NL3D::CTextureBump::validateGenerateFlag" ></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::ITexture::validateGenerateFlag </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, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Advanced. erase the _GoodGenerate=true. Special if you want to setup directly the bitmap without using <a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a>. USE IT WITH CARE!! (used by the <a class="el" href="a02230.html">CAsyncTextureManager</a>) +<p> +Definition at line <a class="el" href="a06506.html#l00322">322</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +References <a class="el" href="a06506.html#l00404">NL3D::ITexture::_GoodGenerate</a>. +<p> +<div class="fragment"><pre>00322 {_GoodGenerate=<span class="keyword">true</span>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea48" doxytag="NL3D::CTextureBump::writeJPG" ></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 NLMISC::CBitmap::writeJPG </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> & </td> + <td class="mdname" nowrap> <em>f</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>quality</em> = 80</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Write a JPG from the object pixels buffer. If the current pixel format is not rgba then the method does nothing If the pixel format is Alpha then we save in 8 bpp <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>f</em> </td><td><a class="el" href="a02270.html">IStream</a> (must be a reading stream) </td></tr> + <tr><td valign=top><em>quality</em> </td><td>0=very bad quality 100=best quality </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>true if succeed, false else</dd></dl> + +<p> +Definition at line <a class="el" href="a05487.html#l00620">620</a> of file <a class="el" href="a05487.html">bitmap.h</a>. +<p> +References <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +<div class="fragment"><pre>00621 { +00622 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"You must put #define USE_JPEG before all include in the file where you call writeJPG() if you want jpeg support"</span>); +00623 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00624 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturea49" doxytag="NL3D::CTextureBump::writeTGA" ></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 NLMISC::CBitmap::writeTGA </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> & </td> + <td class="mdname" nowrap> <em>f</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname" nowrap> <em>d</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>upsideDown</em> = false</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Write a TGA (24 or 32 bits) from the object pixels buffer. If the current pixel format is not rgba then the method does nothing If the pixel format is Alpha then we save in 8 bpp <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>f</em> </td><td><a class="el" href="a02270.html">IStream</a> (must be a reading stream) </td></tr> + <tr><td valign=top><em>d</em> </td><td>depth : 8 or 16 or 24 or 32 </td></tr> + <tr><td valign=top><em>upsideDown</em> </td><td>if true, the bitmap will be saved with the upside down </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>true if succeed, false else</dd></dl> + +<p> +Definition at line <a class="el" href="a05486.html#l02139">2139</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +References <a class="el" href="a05646.html#l01013">depth</a>, <a class="el" href="a05646.html#l01013">height</a>, <a class="el" href="a06463.html#l00064">NLMISC::IStream::isReading()</a>, <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a>, <a class="el" href="a05646.html#l00993">r</a>, <a class="el" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">NLMISC::CBitmap::RGBA</a>, <a class="el" href="a06462.html#l00232">NLMISC::IStream::serial()</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a05646.html#l01013">width</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>. +<p> +Referenced by <a class="el" href="a06523.html#l00133">NL3D::CTextureFont::dumpTextureFont()</a>, <a class="el" href="a06768.html#l02927">NL3D::CZoneLighter::lightWater()</a>, and <a class="el" href="a06092.html#l00192">NL3D::CNELU::screenshot()</a>. +<p> +<div class="fragment"><pre>02140 { +02141 <span class="keywordflow">if</span>(f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>()) <span class="keywordflow">return</span> <span class="keyword">false</span>; +02142 <span class="keywordflow">if</span>(d!=24 && d!=32 && d!=16 && d!=8) <span class="keywordflow">return</span> <span class="keyword">false</span>; +02143 <span class="keywordflow">if</span> ((<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> != <a class="code" href="a02268.html#NL3D_1_1ITexturew31NL3D_1_1ITexturew25">RGBA</a>)&&(<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> != <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew0">Alpha</a>)&&(<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> != <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew14">Luminance</a>)) <span class="keywordflow">return</span> <span class="keyword">false</span>; +02144 <span class="keywordflow">if</span> ((<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew0">Alpha</a>) && (d != 8)) <span class="keywordflow">return</span> <span class="keyword">false</span>; +02145 <span class="keywordflow">if</span> ((<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew14">Luminance</a>) && (d != 8)) <span class="keywordflow">return</span> <span class="keyword">false</span>; +02146 +02147 <a class="code" href="a04558.html#a10">sint32</a> i,j,<a class="code" href="a04223.html#a572">x</a>,<a class="code" href="a04223.html#a573">y</a>; +02148 <a class="code" href="a04558.html#a7">uint8</a> * scanline; +02149 <a class="code" href="a04558.html#a7">uint8</a> <a class="code" href="a04223.html#a628">r</a>,g,b,a; +02150 +02151 <a class="code" href="a04558.html#a7">uint8</a> lengthID = 0; +02152 <a class="code" href="a04558.html#a7">uint8</a> cMapType = 0; +02153 <a class="code" href="a04558.html#a7">uint8</a> imageType = 2; +02154 <a class="code" href="a04558.html#a9">uint16</a> origin = 0; +02155 <a class="code" href="a04558.html#a9">uint16</a> length = 0; +02156 <a class="code" href="a04558.html#a7">uint8</a> <a class="code" href="a04223.html#a634">depth</a> = 0; +02157 <a class="code" href="a04558.html#a9">uint16</a> xOrg = 0; +02158 <a class="code" href="a04558.html#a9">uint16</a> yOrg = 0; +02159 <a class="code" href="a04558.html#a9">uint16</a> <a class="code" href="a04223.html#a632">width</a> = (<a class="code" href="a04558.html#a9">uint16</a>)<a class="code" href="a02268.html#NL3D_1_1ITexturep5">_Width</a>; +02160 <a class="code" href="a04558.html#a9">uint16</a> <a class="code" href="a04223.html#a633">height</a> = (<a class="code" href="a04558.html#a9">uint16</a>)<a class="code" href="a02268.html#NL3D_1_1ITexturep1">_Height</a>; +02161 <a class="code" href="a04558.html#a7">uint8</a> imageDepth = (<a class="code" href="a04558.html#a7">uint8</a>)d; +02162 <a class="code" href="a04558.html#a7">uint8</a> desc = 0; +02163 <span class="keywordflow">if</span> (upsideDown) +02164 desc |= 1<<5; +02165 +02166 <span class="keywordflow">if</span> ((<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew0">Alpha</a>) || (<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew14">Luminance</a>)) +02167 imageType = 3; <span class="comment">// Uncompressed grayscale</span> +02168 +02169 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(lengthID); +02170 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(cMapType); +02171 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(imageType); +02172 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(origin); +02173 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(length); +02174 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(depth); +02175 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(xOrg); +02176 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(yOrg); +02177 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(width); +02178 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(height); +02179 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(imageDepth); +02180 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(desc); +02181 +02182 <span class="keywordflow">if</span> ((<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew0">Alpha</a>)||(<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew14">Luminance</a>)) +02183 scanline = <span class="keyword">new</span> <a class="code" href="a04558.html#a7">uint8</a>[<a class="code" href="a04223.html#a632">width</a>]; +02184 <span class="keywordflow">else</span> +02185 scanline = <span class="keyword">new</span> <a class="code" href="a04558.html#a7">uint8</a>[<a class="code" href="a04223.html#a632">width</a>*4]; +02186 <span class="keywordflow">if</span>(!scanline) +02187 { +02188 <span class="keywordflow">throw</span> EAllocationFailure(); +02189 } +02190 +02191 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a573">y</a>=0; <a class="code" href="a04223.html#a573">y</a><(<a class="code" href="a04558.html#a10">sint32</a>)<a class="code" href="a04223.html#a633">height</a>; <a class="code" href="a04223.html#a573">y</a>++) +02192 { +02193 +02194 <a class="code" href="a04558.html#a11">uint32</a> k=0; +02195 <span class="keywordflow">if</span> (<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew0">Alpha</a>) +02196 { +02197 <span class="keywordflow">for</span>(i=0; i<<a class="code" href="a04223.html#a632">width</a>; ++i) <span class="comment">// Alpha</span> +02198 { +02199 scanline[k++] = <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0][(<a class="code" href="a04223.html#a633">height</a>-<a class="code" href="a04223.html#a573">y</a>-1)*<a class="code" href="a04223.html#a632">width</a> + i]; +02200 } +02201 } +02202 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a02268.html#NL3D_1_1ITextureo3">PixelFormat</a> == <a class="code" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew14">Luminance</a>) +02203 { +02204 <span class="keywordflow">for</span>(i=0; i<<a class="code" href="a04223.html#a632">width</a>; ++i) <span class="comment">// Luminance</span> +02205 { +02206 scanline[k++] = <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0][(<a class="code" href="a04223.html#a633">height</a>-<a class="code" href="a04223.html#a573">y</a>-1)*<a class="code" href="a04223.html#a632">width</a> + i]; +02207 } +02208 } +02209 <span class="keywordflow">else</span> +02210 { +02211 <span class="keywordflow">for</span>(i=0; i<<a class="code" href="a04223.html#a632">width</a>*4; i+=4) <span class="comment">// 4:RGBA</span> +02212 { +02213 <span class="keywordflow">if</span>(d==16) +02214 { +02215 <span class="keywordflow">for</span>(j=0; j<(<a class="code" href="a04558.html#a10">sint32</a>)4; j++) +02216 { +02217 scanline[k++] = <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0][(<a class="code" href="a04223.html#a633">height</a>-<a class="code" href="a04223.html#a573">y</a>-1)*<a class="code" href="a04223.html#a632">width</a>*4 + i + j]; +02218 } +02219 } +02220 <span class="keywordflow">else</span> +02221 { +02222 <span class="keywordflow">for</span>(j=0; j<(<a class="code" href="a04558.html#a10">sint32</a>)d/8; j++) +02223 { +02224 scanline[k++] = <a class="code" href="a02268.html#NL3D_1_1ITexturep0">_Data</a>[0][(<a class="code" href="a04223.html#a633">height</a>-<a class="code" href="a04223.html#a573">y</a>-1)*<a class="code" href="a04223.html#a632">width</a>*4 + i + j]; +02225 } +02226 } +02227 } +02228 } +02229 +02230 <span class="keywordflow">if</span>(d==16) +02231 { +02232 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a><(<a class="code" href="a04558.html#a10">sint32</a>)<a class="code" href="a04223.html#a632">width</a>; <a class="code" href="a04223.html#a572">x</a>++) +02233 { +02234 <a class="code" href="a04223.html#a628">r</a> = scanline[<a class="code" href="a04223.html#a572">x</a>*4+0]; +02235 g = scanline[<a class="code" href="a04223.html#a572">x</a>*4+1]; +02236 b = scanline[<a class="code" href="a04223.html#a572">x</a>*4+2]; +02237 <span class="keywordtype">int</span> rr = <a class="code" href="a04223.html#a628">r</a> >>3; +02238 <span class="keywordtype">int</span> gg = g >>3; +02239 <span class="keywordtype">int</span> bb = b >>3; +02240 <a class="code" href="a04558.html#a9">uint16</a> c16 = (rr<<10) | (gg<<5) | bb; +02241 scanline[<a class="code" href="a04223.html#a572">x</a>*2+0] = c16&0xff; +02242 scanline[<a class="code" href="a04223.html#a572">x</a>*2+1] = c16>>8; +02243 } +02244 } +02245 <span class="keywordflow">if</span>(d==24) +02246 { +02247 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a><(<a class="code" href="a04558.html#a10">sint32</a>)<a class="code" href="a04223.html#a632">width</a>; <a class="code" href="a04223.html#a572">x</a>++) +02248 { +02249 <a class="code" href="a04223.html#a628">r</a> = scanline[<a class="code" href="a04223.html#a572">x</a>*3+0]; +02250 g = scanline[<a class="code" href="a04223.html#a572">x</a>*3+1]; +02251 b = scanline[<a class="code" href="a04223.html#a572">x</a>*3+2]; +02252 scanline[<a class="code" href="a04223.html#a572">x</a>*3+0] = b; +02253 scanline[<a class="code" href="a04223.html#a572">x</a>*3+1] = g; +02254 scanline[<a class="code" href="a04223.html#a572">x</a>*3+2] = <a class="code" href="a04223.html#a628">r</a>; +02255 } +02256 } +02257 <span class="keywordflow">if</span>(d==32) +02258 { +02259 <span class="keywordflow">for</span>(<a class="code" href="a04223.html#a572">x</a>=0; <a class="code" href="a04223.html#a572">x</a><(<a class="code" href="a04558.html#a10">sint32</a>)<a class="code" href="a04223.html#a632">width</a>; <a class="code" href="a04223.html#a572">x</a>++) +02260 { +02261 <a class="code" href="a04223.html#a628">r</a> = scanline[<a class="code" href="a04223.html#a572">x</a>*4+0]; +02262 g = scanline[<a class="code" href="a04223.html#a572">x</a>*4+1]; +02263 b = scanline[<a class="code" href="a04223.html#a572">x</a>*4+2]; +02264 a= scanline[<a class="code" href="a04223.html#a572">x</a>*4+3]; +02265 scanline[<a class="code" href="a04223.html#a572">x</a>*4+0] = b; +02266 scanline[<a class="code" href="a04223.html#a572">x</a>*4+1] = g; +02267 scanline[<a class="code" href="a04223.html#a572">x</a>*4+2] = <a class="code" href="a04223.html#a628">r</a>; +02268 scanline[<a class="code" href="a04223.html#a572">x</a>*4+3] = a; +02269 } +02270 } +02271 +02272 <span class="keywordtype">int</span> finaleSize=<a class="code" href="a04223.html#a632">width</a>*d/8; +02273 <span class="keywordflow">for</span>(i=0; i<finaleSize; i++) +02274 { +02275 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(scanline[i]); +02276 } +02277 } +02278 <span class="keyword">delete</span> scanline; +02279 <span class="keywordflow">return</span> <span class="keyword">true</span>; +02280 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Friends And Related Function Documentation</h2> +<a class="anchor" name="NLGEORGES_1_1UTypen0" doxytag="NL3D::CTextureBump::CPtrInfo" ></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"> friend struct CPtrInfo<code> [friend, inherited]</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="a06402.html#l00067">67</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>. </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NL3D_1_1ITexturep0" doxytag="NL3D::CTextureBump::_Data" ></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="a03000.html">CObjectVector</a><<a class="el" href="a04558.html#a7">uint8</a>> <a class="el" href="a02268.html#NL3D_1_1ITexturep0">NLMISC::CBitmap::_Data</a>[MAX_MIPMAP]<code> [protected, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Reimplemented in <a class="el" href="a03511.html#NL3D_1_1CTextureMemr1">NL3D::CTextureMem</a>. +<p> +Definition at line <a class="el" href="a05487.html#l00090">90</a> of file <a class="el" href="a05487.html">bitmap.h</a>. +<p> +Referenced by <a class="el" href="a05486.html#l02817">NLMISC::CBitmap::blend()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpp1" doxytag="NL3D::CTextureBump::_DisableSharing" ></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="a03489.html#NL3D_1_1CTextureBumpp1">NL3D::CTextureBump::_DisableSharing</a><code> [protected]</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="a06512.html#l00105">105</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +Referenced by <a class="el" href="a06512.html#l00065">enableSharing()</a>, <a class="el" href="a06512.html#l00067">isSharingEnabled()</a>, and <a class="el" href="a06511.html#l00368">supportSharing()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpp2" doxytag="NL3D::CTextureBump::_ForceNormalize" ></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="a03489.html#NL3D_1_1CTextureBumpp2">NL3D::CTextureBump::_ForceNormalize</a><code> [protected]</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="a06512.html#l00107">107</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturep1" doxytag="NL3D::CTextureBump::_Height" ></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#a11">uint32</a> <a class="el" href="a02268.html#NL3D_1_1ITexturep1">NLMISC::CBitmap::_Height</a><code> [protected, inherited]</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="a05487.html#l00096">96</a> of file <a class="el" href="a05487.html">bitmap.h</a>. +<p> +Referenced by <a class="el" href="a05486.html#l02817">NLMISC::CBitmap::blend()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpp4" doxytag="NL3D::CTextureBump::_HeightMap" ></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="a03408.html">NLMISC::CSmartPtr</a><<a class="el" href="a03487.html">ITexture</a>> <a class="el" href="a03489.html#NL3D_1_1CTextureBumpp4">NL3D::CTextureBump::_HeightMap</a><code> [protected]</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="a06512.html#l00103">103</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +Referenced by <a class="el" href="a06511.html#l00277">doGenerate()</a>, <a class="el" href="a06512.html#l00054">getHeightMap()</a>, <a class="el" href="a06511.html#l00375">getShareName()</a>, <a class="el" href="a06511.html#l00354">release()</a>, <a class="el" href="a06511.html#l00237">setHeightMap()</a>, and <a class="el" href="a06511.html#l00368">supportSharing()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITextureo0" doxytag="NL3D::CTextureBump::_ListInvalidRect" ></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"> std::list<<a class="el" href="a03319.html">NLMISC::CRect</a>> <a class="el" href="a03487.html#NL3D_1_1ITextureo0">NL3D::ITexture::_ListInvalidRect</a><code> [inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +List of invalided rectangle. If the list is empty, <a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a> will rebuild all the texture.<p> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a03487.html#NL3D_1_1ITexturea21">isAllInvalidated()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea9">generate()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea44">touch()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea46">touchRect()</a>, <a class="el" href="a03487.html#NL3D_1_1ITexturea45">touched()</a></dd></dl> + +<p> +Definition at line <a class="el" href="a06506.html#l00422">422</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +Referenced by <a class="el" href="a06506.html#l00448">NL3D::ITexture::clearTouched()</a>, <a class="el" href="a06506.html#l00428">NL3D::ITexture::isAllInvalidated()</a>, <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>, <a class="el" href="a06506.html#l00227">NL3D::ITexture::touch()</a>, and <a class="el" href="a06506.html#l00242">NL3D::ITexture::touchRect()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturep2" doxytag="NL3D::CTextureBump::_LoadGrayscaleAsAlpha" ></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="a02268.html#NL3D_1_1ITexturep2">NLMISC::CBitmap::_LoadGrayscaleAsAlpha</a><code> [protected, inherited]</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="a05487.html#l00094">94</a> of file <a class="el" href="a05487.html">bitmap.h</a>. +<p> +Referenced by <a class="el" href="a05487.html#l00254">NLMISC::CBitmap::CBitmap()</a>, <a class="el" href="a05487.html#l00483">NLMISC::CBitmap::isGrayscaleAsAlpha()</a>, <a class="el" href="a05487.html#l00472">NLMISC::CBitmap::loadGrayscaleAsAlpha()</a>, and <a class="el" href="a05486.html#l01800">NLMISC::CBitmap::readTGA()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturep3" doxytag="NL3D::CTextureBump::_MipMapCount" ></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="a02268.html#NL3D_1_1ITexturep3">NLMISC::CBitmap::_MipMapCount</a><code> [protected, inherited]</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="a05487.html#l00093">93</a> of file <a class="el" href="a05487.html">bitmap.h</a>. +<p> +Referenced by <a class="el" href="a05486.html#l00762">NLMISC::CBitmap::alphaLuminanceToAlpha()</a>, <a class="el" href="a05486.html#l00677">NLMISC::CBitmap::alphaLuminanceToLuminance()</a>, <a class="el" href="a05486.html#l00519">NLMISC::CBitmap::alphaLuminanceToRGBA()</a>, <a class="el" href="a05486.html#l00607">NLMISC::CBitmap::alphaToAlphaLuminance()</a>, <a class="el" href="a05486.html#l00490">NLMISC::CBitmap::alphaToRGBA()</a>, <a class="el" href="a05486.html#l01422">NLMISC::CBitmap::buildMipMaps()</a>, <a class="el" href="a05487.html#l00254">NLMISC::CBitmap::CBitmap()</a>, <a class="el" href="a05486.html#l00965">NLMISC::CBitmap::decompressDXT1()</a>, <a class="el" href="a05486.html#l01090">NLMISC::CBitmap::decompressDXT3()</a>, <a class="el" href="a05486.html#l01200">NLMISC::CBitmap::decompressDXT5()</a>, <a class="el" href="a05486.html#l02682">NLMISC::CBitmap::flipH()</a>, <a class="el" href="a05486.html#l02714">NLMISC::CBitmap::flipV()</a>, <a class="el" href="a05487.html#l00369">NLMISC::CBitmap::getMipMapCount()</a>, <a class="el" href="a05486.html#l00736">NLMISC::CBitmap::luminanceToAlpha()</a>, <a class="el" href="a05486.html#l00579">NLMISC::CBitmap::luminanceToAlphaLuminance()</a>, <a class="el" href="a05486.html#l00462">NLMISC::CBitmap::luminanceToRGBA()</a>, <a class="el" href="a05486.html#l00184">NLMISC::CBitmap::makeDummy()</a>, <a class="el" href="a05486.html#l00244">NLMISC::CBitmap::readDDS()</a>, <a class="el" href="a05486.html#l01800">NLMISC::CBitmap::readTGA()</a>, <a class="el" href="a05486.html#l01493">NLMISC::CBitmap::releaseMipMaps()</a>, <a class="el" href="a05486.html#l01508">NLMISC::CBitmap::resample()</a>, <a class="el" href="a05486.html#l01599">NLMISC::CBitmap::reset()</a>, <a class="el" href="a05486.html#l00708">NLMISC::CBitmap::rgbaToAlpha()</a>, <a class="el" href="a05486.html#l00550">NLMISC::CBitmap::rgbaToAlphaLuminance()</a>, <a class="el" href="a05486.html#l00635">NLMISC::CBitmap::rgbaToLuminance()</a>, <a class="el" href="a05486.html#l02781">NLMISC::CBitmap::rot90CCW()</a>, <a class="el" href="a05486.html#l02746">NLMISC::CBitmap::rot90CW()</a>, and <a class="el" href="a05486.html#l01590">NLMISC::CBitmap::setMipMapCount()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpt0" doxytag="NL3D::CTextureBump::_NameToNF" ></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="a03489.html#NL3D_1_1CTextureBumpx0">CTextureBump::TNameToNI</a> <a class="el" href="a03489.html#NL3D_1_1CTextureBumpt0">NL3D::CTextureBump::_NameToNF</a><code> [static, protected]</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="a06511.html#l00034">34</a> of file <a class="el" href="a06511.html">texture_bump.cpp</a>. +<p> +Referenced by <a class="el" href="a06511.html#l00277">doGenerate()</a>, <a class="el" href="a06511.html#l00382">getNormalizationFactor()</a>, and <a class="el" href="a06511.html#l00405">~CTextureBump()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpp7" doxytag="NL3D::CTextureBump::_NameToNFHandle" ></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"> TNameToNI::iterator <a class="el" href="a03489.html#NL3D_1_1CTextureBumpp7">NL3D::CTextureBump::_NameToNFHandle</a><code> [protected]</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="a06512.html#l00117">117</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +Referenced by <a class="el" href="a06511.html#l00277">doGenerate()</a>, <a class="el" href="a06511.html#l00382">getNormalizationFactor()</a>, and <a class="el" href="a06511.html#l00405">~CTextureBump()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpp8" doxytag="NL3D::CTextureBump::_NormalizationFactor" ></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="a03489.html#NL3D_1_1CTextureBumpp8">NL3D::CTextureBump::_NormalizationFactor</a><code> [protected]</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="a06512.html#l00104">104</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +Referenced by <a class="el" href="a06511.html#l00277">doGenerate()</a>, <a class="el" href="a06511.html#l00382">getNormalizationFactor()</a>, and <a class="el" href="a06511.html#l00405">~CTextureBump()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpp9" doxytag="NL3D::CTextureBump::_Signed" ></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="a03489.html#NL3D_1_1CTextureBumpp9">NL3D::CTextureBump::_Signed</a><code> [protected]</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="a06512.html#l00108">108</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +Referenced by <a class="el" href="a06511.html#l00277">doGenerate()</a>, <a class="el" href="a06512.html#l00091">getSignedFormat()</a>, and <a class="el" href="a06512.html#l00090">setSignedFormat()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturep4" doxytag="NL3D::CTextureBump::_Touched" ></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="a03487.html#NL3D_1_1ITexturep4">NL3D::ITexture::_Touched</a><code> [protected, inherited]</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="a06506.html#l00387">387</a> of file <a class="el" href="a06506.html">texture.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTextureBumpp11" doxytag="NL3D::CTextureBump::_UseAbsoluteOffsets" ></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="a03489.html#NL3D_1_1CTextureBumpp11">NL3D::CTextureBump::_UseAbsoluteOffsets</a><code> [protected]</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="a06512.html#l00106">106</a> of file <a class="el" href="a06512.html">texture_bump.h</a>. +<p> +Referenced by <a class="el" href="a06511.html#l00277">doGenerate()</a>, <a class="el" href="a06512.html#l00071">getAbsoluteOffsets()</a>, and <a class="el" href="a06512.html#l00070">setAbsoluteOffsets()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITexturep5" doxytag="NL3D::CTextureBump::_Width" ></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#a11">uint32</a> <a class="el" href="a02268.html#NL3D_1_1ITexturep5">NLMISC::CBitmap::_Width</a><code> [protected, inherited]</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="a05487.html#l00095">95</a> of file <a class="el" href="a05487.html">bitmap.h</a>. +<p> +Referenced by <a class="el" href="a05486.html#l02817">NLMISC::CBitmap::blend()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITextures0" doxytag="NL3D::CTextureBump::bitPerPixels" ></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"> const <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a02268.html#NL3D_1_1ITextures0">NLMISC::CBitmap::bitPerPixels</a><code> [static, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +<b>Initial value:</b><div class="fragment"><pre> +{ + 32, + 8, + 8, + 16, + 4, + 4, + 8, + 8, + 16 +} +</pre></div> +<p> +Definition at line <a class="el" href="a05486.html#l00070">70</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +Referenced by <a class="el" href="a05486.html#l02332">NLMISC::CBitmap::blit()</a>, and <a class="el" href="a05486.html#l01565">NLMISC::CBitmap::resizeMipMap()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLGEORGES_1_1UTypeo0" doxytag="NL3D::CTextureBump::crefs" ></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#a14">sint</a> <a class="el" href="a02209.html#NLGEORGES_1_1UTypeo0">NLMISC::CRefCount::crefs</a><code> [mutable, inherited]</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="a06402.html#l00079">79</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>. +<p> +Referenced by <a class="el" href="a06402.html#l00085">NLMISC::CRefCount::CRefCount()</a>, <a class="el" href="a06402.html#l00070">NLMISC::CRefCount::getRefCount()</a>, and <a class="el" href="a06403.html#l00044">NLMISC::CRefCount::~CRefCount()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITextures1" doxytag="NL3D::CTextureBump::DXTC1HEADER" ></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"> const <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a02268.html#NL3D_1_1ITextures1">NLMISC::CBitmap::DXTC1HEADER</a> = NL_MAKEFOURCC('D','X', 'T', '1')<code> [static, inherited]</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="a05486.html#l00083">83</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +Referenced by <a class="el" href="a05486.html#l00244">NLMISC::CBitmap::readDDS()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITextures2" doxytag="NL3D::CTextureBump::DXTC3HEADER" ></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"> const <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a02268.html#NL3D_1_1ITextures2">NLMISC::CBitmap::DXTC3HEADER</a> = NL_MAKEFOURCC('D','X', 'T', '3')<code> [static, inherited]</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="a05486.html#l00084">84</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +Referenced by <a class="el" href="a05486.html#l00244">NLMISC::CBitmap::readDDS()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITextures3" doxytag="NL3D::CTextureBump::DXTC5HEADER" ></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"> const <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a02268.html#NL3D_1_1ITextures3">NLMISC::CBitmap::DXTC5HEADER</a> = NL_MAKEFOURCC('D','X', 'T', '5')<code> [static, inherited]</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="a05486.html#l00085">85</a> of file <a class="el" href="a05486.html">bitmap.cpp</a>. +<p> +Referenced by <a class="el" href="a05486.html#l00244">NLMISC::CBitmap::readDDS()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLGEORGES_1_1UTypes0" doxytag="NL3D::CTextureBump::NullPtrInfo" ></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="a03320.html">CRefCount::CPtrInfo</a> <a class="el" href="a02209.html#NLGEORGES_1_1UTypes0">NLMISC::CRefCount::NullPtrInfo</a><code> [static, inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Referenced by <a class="el" href="a06402.html#l00085">NLMISC::CRefCount::CRefCount()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLGEORGES_1_1UTypeo1" doxytag="NL3D::CTextureBump::pinfo" ></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"> CPtrInfo* <a class="el" href="a02209.html#NLGEORGES_1_1UTypeo1">NLMISC::CRefCount::pinfo</a><code> [mutable, inherited]</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="a06402.html#l00080">80</a> of file <a class="el" href="a06402.html">smart_ptr.h</a>. +<p> +Referenced by <a class="el" href="a06402.html#l00085">NLMISC::CRefCount::CRefCount()</a>, and <a class="el" href="a06403.html#l00044">NLMISC::CRefCount::~CRefCount()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITextureo3" doxytag="NL3D::CTextureBump::PixelFormat" ></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"> enum <a class="el" href="a02268.html#NL3D_1_1ITexturew31">NLMISC::CBitmap::TType</a> <a class="el" href="a02268.html#NL3D_1_1ITextureo3">NLMISC::CBitmap::PixelFormat</a><code> [inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Referenced by <a class="el" href="a05486.html#l00762">NLMISC::CBitmap::alphaLuminanceToAlpha()</a>, <a class="el" href="a05486.html#l00677">NLMISC::CBitmap::alphaLuminanceToLuminance()</a>, <a class="el" href="a05486.html#l00519">NLMISC::CBitmap::alphaLuminanceToRGBA()</a>, <a class="el" href="a05486.html#l00607">NLMISC::CBitmap::alphaToAlphaLuminance()</a>, <a class="el" href="a05486.html#l00664">NLMISC::CBitmap::alphaToLuminance()</a>, <a class="el" href="a05486.html#l00490">NLMISC::CBitmap::alphaToRGBA()</a>, <a class="el" href="a05486.html#l02817">NLMISC::CBitmap::blend()</a>, <a class="el" href="a05486.html#l02332">NLMISC::CBitmap::blit()</a>, <a class="el" href="a06521.html#l00041">NL3D::CTextureFile::buildBitmapFromFile()</a>, <a class="el" href="a05486.html#l01422">NLMISC::CBitmap::buildMipMaps()</a>, <a class="el" href="a05487.html#l00254">NLMISC::CBitmap::CBitmap()</a>, <a class="el" href="a05486.html#l00821">NLMISC::CBitmap::convertToAlpha()</a>, <a class="el" href="a05486.html#l00852">NLMISC::CBitmap::convertToAlphaLuminance()</a>, <a class="el" href="a05486.html#l00790">NLMISC::CBitmap::convertToLuminance()</a>, <a class="el" href="a05486.html#l00882">NLMISC::CBitmap::convertToRGBA()</a>, <a class="el" href="a05486.html#l00926">NLMISC::CBitmap::convertToType()</a>, <a class="el" href="a05486.html#l00965">NLMISC::CBitmap::decompressDXT1()</a>, <a class="el" href="a05486.html#l01090">NLMISC::CBitmap::decompressDXT3()</a>, <a class="el" href="a05486.html#l01200">NLMISC::CBitmap::decompressDXT5()</a>, <a class="el" href="a05486.html#l02682">NLMISC::CBitmap::flipH()</a>, <a class="el" href="a05486.html#l02714">NLMISC::CBitmap::flipV()</a>, <a class="el" href="a05486.html#l02470">NLMISC::CBitmap::getColor()</a>, <a class="el" href="a05486.html#l03134">NLMISC::CBitmap::getPixelColor()</a>, <a class="el" href="a05487.html#l00335">NLMISC::CBitmap::getPixelFormat()</a>, <a class="el" href="a05486.html#l00736">NLMISC::CBitmap::luminanceToAlpha()</a>, <a class="el" href="a05486.html#l00579">NLMISC::CBitmap::luminanceToAlphaLuminance()</a>, <a class="el" href="a05486.html#l00462">NLMISC::CBitmap::luminanceToRGBA()</a>, <a class="el" href="a05486.html#l00184">NLMISC::CBitmap::makeDummy()</a>, <a class="el" href="a05486.html#l00244">NLMISC::CBitmap::readDDS()</a>, <a class="el" href="a05486.html#l01800">NLMISC::CBitmap::readTGA()</a>, <a class="el" href="a05486.html#l01508">NLMISC::CBitmap::resample()</a>, <a class="el" href="a05486.html#l01599">NLMISC::CBitmap::reset()</a>, <a class="el" href="a05486.html#l01545">NLMISC::CBitmap::resize()</a>, <a class="el" href="a05486.html#l01565">NLMISC::CBitmap::resizeMipMap()</a>, <a class="el" href="a05486.html#l00708">NLMISC::CBitmap::rgbaToAlpha()</a>, <a class="el" href="a05486.html#l00550">NLMISC::CBitmap::rgbaToAlphaLuminance()</a>, <a class="el" href="a05486.html#l00635">NLMISC::CBitmap::rgbaToLuminance()</a>, <a class="el" href="a05486.html#l02781">NLMISC::CBitmap::rot90CCW()</a>, <a class="el" href="a05486.html#l02746">NLMISC::CBitmap::rot90CW()</a>, <a class="el" href="a05486.html#l02306">NLMISC::CBitmap::rotateCCW()</a>, <a class="el" href="a05652.html#l00322">NL3D::sameDXTCFormat()</a>, and <a class="el" href="a05486.html#l02139">NLMISC::CBitmap::writeTGA()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1ITextureo4" doxytag="NL3D::CTextureBump::TextureDrvShare" ></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="a03321.html">NLMISC::CRefPtr</a><<a class="el" href="a03496.html">CTextureDrvShare</a>> <a class="el" href="a03487.html#NL3D_1_1ITextureo4">NL3D::ITexture::TextureDrvShare</a><code> [inherited]</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="a06506.html#l00416">416</a> of file <a class="el" href="a06506.html">texture.h</a>. +<p> +Referenced by <a class="el" href="a05642.html#l02185">NL3D::CDriverGL::copyFrameBufferToTexture()</a>, <a class="el" href="a05652.html#l00089">NL3D::getTextureGl()</a>, <a class="el" href="a05652.html#l01217">NL3D::CDriverGL::getTextureHandle()</a>, <a class="el" href="a06505.html#l00064">NL3D::ITexture::releaseDriverSetup()</a>, <a class="el" href="a06506.html#l00343">NL3D::ITexture::setupedIntoDriver()</a>, <a class="el" href="a05652.html#l00361">NL3D::CDriverGL::setupTextureEx()</a>, <a class="el" href="a05652.html#l00807">NL3D::CDriverGL::uploadTexture()</a>, and <a class="el" href="a05652.html#l00930">NL3D::CDriverGL::uploadTextureCube()</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a06512.html">texture_bump.h</a><li><a class="el" href="a06511.html">texture_bump.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 07:52:16 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> |