diff options
author | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
commit | 0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch) | |
tree | 2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/texture_far_h-source.html | |
download | nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip |
Initial commit
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/texture_far_h-source.html | 251 |
1 files changed, 251 insertions, 0 deletions
diff --git a/docs/doxygen/nel/texture_far_h-source.html b/docs/doxygen/nel/texture_far_h-source.html new file mode 100644 index 00000000..b634f656 --- /dev/null +++ b/docs/doxygen/nel/texture_far_h-source.html @@ -0,0 +1,251 @@ +<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> +<HTML> +<HEAD> + <TITLE>nevrax.org : docs</TITLE> + <LINK REL=stylesheet TYPE="text/css" HREF="http://www.nevrax.org/inc/css/nevrax.css"> + <link href="doxygen.css" rel="stylesheet" type="text/css"> +</HEAD> +<BODY MARGINHEIGHT="0" MARGINWIDTH="0"> + +<!-- uplinks --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A> </TD> + <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A> </TD> + </TR> +</TABLE> + +<!-- banner Nevrax --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%> + <TR><TD BGCOLOR="#000000" BACKGROUND="http://www.nevrax.org/inc/img/black_banner.jpg"><A HREF="http://www.nevrax.org"><IMG SRC="http://www.nevrax.org/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR> +</TABLE> + +<!-- main table --> +<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%> + <TR> + <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD> + <TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + + <!------ Begin Box ------> + <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black> + <FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF> + <TABLE cellspacing=0 cellpadding=1 border=0> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="News">News</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Documentation">Documentation</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="CVS Web">CVS</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Bugtracking">Bugs</a></td></tr> + <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="License">License</a></td></tr> + </TABLE> + </TD></TR></TABLE></TD></TR></TABLE> + <!------ End Box ------> + + </TD> + <TD WIDTH=15><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD> + <TD ALIGN=left valign=top><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT=""> + +<!-- title --> +<TABLE background="http://www.nevrax.org/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td> +<A HREF="http://www.nevrax.org/docs/"><img src="http://www.nevrax.org/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A> +</td><td><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT=""> +</td></tr></table> + + +<!-- block --> +<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="http://www.nevrax.org/inc/img/reddots.gif"></TD> + <TD><B>Documentation</B></TD> + <TD ALIGN=RIGHT> </td> +</tr></table> +<!-- Generated by Doxygen 1.2.2 on Wed May 30 22:01:23 2001 --> +<center> +<a class="qindex" href="index.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">Compound List</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">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindexRef" doxygen="_cgi:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> </center> +<hr><h1>texture_far.h</h1><a href="texture_far_h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 +00007 <font class="comment">/* Copyright, 2000 Nevrax Ltd. +</font>00008 <font class="comment"> * +</font>00009 <font class="comment"> * This file is part of NEVRAX NEL. +</font>00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify +</font>00011 <font class="comment"> * it under the terms of the GNU General Public License as published by +</font>00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option) +</font>00013 <font class="comment"> * any later version. +</font>00014 <font class="comment"> +</font>00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but +</font>00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of +</font>00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +</font>00018 <font class="comment"> * General Public License for more details. +</font>00019 <font class="comment"> +</font>00020 <font class="comment"> * You should have received a copy of the GNU General Public License +</font>00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the +</font>00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +</font>00023 <font class="comment"> * MA 02111-1307, USA. +</font>00024 <font class="comment"> */</font> +00025 +00026 <font class="preprocessor">#ifndef NL_TEXTURE_FAR_H +</font>00027 <font class="preprocessor"></font><font class="preprocessor">#define NL_TEXTURE_FAR_H +</font>00028 <font class="preprocessor"></font> +00029 <font class="preprocessor">#include "<a class="code" href="types_nl_h.html">nel/misc/types_nl.h</a>"</font> +00030 <font class="preprocessor">#include "<a class="code" href="texture_h.html">nel/3d/texture.h</a>"</font> +00031 <font class="preprocessor">#include "<a class="code" href="rect_h.html">nel/misc/rect.h</a>"</font> +00032 +00033 <font class="comment">// Define the number of tile per tile far texture </font> +<a name="l00034"></a><a class="code" href="texture_far_h.html#a0">00034</a> <font class="preprocessor">#define NL_NUM_FAR_PATCHES_BY_EDGE_SHIFT 2 // 2 (shit) +</font>00035 <font class="preprocessor"></font> +00036 <font class="comment">// Same by precomputed values</font> +<a name="l00037"></a><a class="code" href="texture_far_h.html#a1">00037</a> <font class="preprocessor">#define NL_NUM_FAR_PATCHES_BY_EDGE (1<<NL_NUM_FAR_PATCHES_BY_EDGE_SHIFT) // 4 patches by edges +</font><a name="l00038"></a><a class="code" href="texture_far_h.html#a2">00038</a> <font class="preprocessor"></font><font class="preprocessor">#define NL_NUM_FAR_PATCHES_BY_EDGE_MASK (NL_NUM_FAR_PATCHES_BY_EDGE-1) // 0x3 (mask) +</font><a name="l00039"></a><a class="code" href="texture_far_h.html#a3">00039</a> <font class="preprocessor"></font><font class="preprocessor">#define NL_NUM_FAR_PATCHES_BY_TEXTURE (NL_NUM_FAR_PATCHES_BY_EDGE*NL_NUM_FAR_PATCHES_BY_EDGE) // 16 patches by CTextureFar +</font>00040 <font class="preprocessor"></font> +00041 <font class="keyword">namespace</font> NLMISC +00042 { +00043 <font class="keyword">class </font>CRGBA; +00044 } +00045 +00046 <font class="keyword">namespace</font> NL3D +00047 { +00048 +00049 <font class="keyword">class </font>CPatch; +00050 <font class="keyword">class </font>CTileFarBank; +00051 <font class="keyword">class </font>CTileColor; +00052 <font class="keyword">class </font>CTileLumel; +00053 +<a name="l00068"></a><a class="code" href="class_NL3D__CTextureFar.html">00068</a> <font class="keyword">class </font>CTextureFar : <font class="keyword">public</font> ITexture +00069 { +00070 <font class="keyword">public</font>: +<a name="l00072"></a><a class="code" href="class_NL3D__CTextureFar__CPatchIdent.html">00072</a> <font class="keyword">struct </font>CPatchIdent +00073 { +<a name="l00075"></a><a class="code" href="class_NL3D__CTextureFar__CPatchIdent.html#a0">00075</a> CPatchIdent ()<font class="keyword"> </font>{}; +00076 +<a name="l00078"></a><a class="code" href="class_NL3D__CTextureFar__CPatchIdent.html#a1">00078</a> CPatchIdent (CPatch* patch)<font class="keyword"> +</font>00079 <font class="keyword"> </font>{ +00080 Patch=patch; +00081 } +00082 +00083 <font class="comment">// Data</font> +00084 +00085 <font class="comment">// Patch pointer</font> +<a name="l00086"></a><a class="code" href="class_NL3D__CTextureFar__CPatchIdent.html#m0">00086</a> CPatch* Patch; +00087 }; +00088 +<a name="l00090"></a><a class="code" href="class_NL3D__CTextureFar.html#a0">00090</a> CTextureFar()<font class="keyword"> +</font>00091 <font class="keyword"> </font>{ +00092 <font class="comment">// This texture is releasable. It doesn't stays in standard memory after been uploaded into video memory.</font> +00093 setReleasable (<font class="keyword">true</font>); +00094 } +00095 +00104 <font class="keywordtype">void</font> setSizeOfFarPatch (sint width, sint height); +00105 +00116 <font class="keywordtype">bool</font> addPatch (CPatch *pPatch, <font class="keywordtype">float</font>& far1UScale, <font class="keywordtype">float</font>& far1VScale, <font class="keywordtype">float</font>& far1UBias, <font class="keywordtype">float</font>& far1VBias, <font class="keywordtype">bool</font>& bRot); +00117 +00121 <font class="keywordtype">bool</font> removePatch (CPatch *pPatch); +00122 +00128 <font class="keyword">virtual</font> <font class="keywordtype">void</font> doGenerate(); +00129 +00130 <font class="comment">// Data</font> +00131 +<a name="l00136"></a><a class="code" href="class_NL3D__CTextureFar.html#m0">00136</a> std::vector<CPatchIdent> _Patches; +00137 +00138 <font class="comment">// Count of patch stored in this texture</font> +<a name="l00139"></a><a class="code" href="class_NL3D__CTextureFar.html#m1">00139</a> uint32 _PatchCount; +00140 +<a name="l00142"></a><a class="code" href="class_NL3D__CTextureFar.html#m2">00142</a> CTileFarBank* _Bank; +00143 +00144 <font class="keyword">private</font>: +<a name="l00146"></a><a class="code" href="class_NL3D__CTextureFar.html#o0">00146</a> uint32 _OriginalWidth; +<a name="l00147"></a><a class="code" href="class_NL3D__CTextureFar.html#o1">00147</a> uint32 _OriginalHeight; +00148 +00152 <font class="keywordtype">void</font> rebuildRectangle (uint x, uint y); +00153 +<a name="l00155"></a><a class="code" href="class_NL3D__CTextureFar.html#c1">00155</a> <font class="keyword">virtual</font> <font class="keywordtype">void</font> serial(<a class="code" href="class_NLMISC__IStream.html">NLMISC::IStream</a> &f) <font class="keywordflow">throw</font>(<a class="code" href="class_NLMISC__EStream.html">NLMISC::EStream</a>) {}; +00156 +00157 <font class="comment">// Some static buffers</font> +00158 <font class="keyword">static</font> <a class="code" href="class_NLMISC__CRGBA.html">NLMISC::CRGBA</a> _LightmapExpanded[]; +00159 <font class="keyword">static</font> CTileLumel _LumelExpanded[]; +00160 +00161 <a class="code" href="class_registry_h.html#a0">NLMISC_DECLARE_CLASS</a>(CTextureFar); +00162 }; +00163 +00164 } <font class="comment">// NL3D</font> +00165 +00166 <font class="comment">// For NL3D_drawFarTileInFarTexture external call</font> +<a name="l00167"></a><a class="code" href="class_NL3D_CComputeTileFar.html">00167</a> <font class="keyword">struct </font><a class="code" href="class_NL3D_CComputeTileFar.html">NL3D_CComputeTileFar</a> +00168 { +00169 <font class="keyword">public</font>: +00170 <font class="comment">// TileFar pixels</font> +<a name="l00171"></a><a class="code" href="class_NL3D_CComputeTileFar.html#m0">00171</a> <font class="keyword">const</font> <a class="code" href="class_NLMISC__CRGBA.html">NLMISC::CRGBA</a>* SrcDiffusePixels; +00172 +00173 <font class="comment">// TileFar pixels</font> +<a name="l00174"></a><a class="code" href="class_NL3D_CComputeTileFar.html#m1">00174</a> <font class="keyword">const</font> <a class="code" href="class_NLMISC__CRGBA.html">NLMISC::CRGBA</a>* SrcAdditivePixels; +00175 +00176 <font class="comment">// Source deltaY</font> +<a name="l00177"></a><a class="code" href="class_NL3D_CComputeTileFar.html#m2">00177</a> sint32 SrcDeltaX; +00178 +00179 <font class="comment">// Source deltaY</font> +<a name="l00180"></a><a class="code" href="class_NL3D_CComputeTileFar.html#m3">00180</a> sint32 SrcDeltaY; +00181 +00182 <font class="comment">// Source lighting</font> +<a name="l00183"></a><a class="code" href="class_NL3D_CComputeTileFar.html#m4">00183</a> <font class="keyword">const</font> <a class="code" href="class_NLMISC__CRGBA.html">NLMISC::CRGBA</a>* SrcLightingPixels; +00184 +00185 <font class="comment">// Delta Y for lighting</font> +<a name="l00186"></a><a class="code" href="class_NL3D_CComputeTileFar.html#m5">00186</a> sint32 SrcLightingDeltaY; +00187 +00188 <font class="comment">// TileFar pixels</font> +<a name="l00189"></a><a class="code" href="class_NL3D_CComputeTileFar.html#m6">00189</a> <a class="code" href="class_NLMISC__CRGBA.html">NLMISC::CRGBA</a>* DstPixels; +00190 +00191 <font class="comment">// Destination deltaX</font> +<a name="l00192"></a><a class="code" href="class_NL3D_CComputeTileFar.html#m7">00192</a> sint32 DstDeltaX; +00193 +00194 <font class="comment">// Destination deltaY</font> +<a name="l00195"></a><a class="code" href="class_NL3D_CComputeTileFar.html#m8">00195</a> sint32 DstDeltaY; +00196 +00197 <font class="comment">// Size</font> +<a name="l00198"></a><a class="code" href="class_NL3D_CComputeTileFar.html#m9">00198</a> sint32 Size; +00199 }; +00200 +00201 <font class="comment">// For NL3D_expandLightmap external call</font> +<a name="l00202"></a><a class="code" href="class_NL3D_CExpandLightmap.html">00202</a> <font class="keyword">struct </font><a class="code" href="class_NL3D_CExpandLightmap.html">NL3D_CExpandLightmap</a> +00203 { +00204 <font class="keyword">public</font>: +00205 <font class="comment">// CTileColor array.</font> +<a name="l00206"></a><a class="code" href="class_NL3D_CExpandLightmap.html#m0">00206</a> <font class="keyword">const</font> <a class="code" href="class_NL3D__CTileColor.html">NL3D::CTileColor</a>* ColorTile; +00207 +00208 <font class="comment">// CTileLumel array. Same resolution than destination buffer</font> +<a name="l00209"></a><a class="code" href="class_NL3D_CExpandLightmap.html#m1">00209</a> <font class="keyword">const</font> <a class="code" href="class_NL3D__CTileLumel.html">NL3D::CTileLumel</a>* LumelTile; +00210 +00211 <font class="comment">// Width of the array</font> +<a name="l00212"></a><a class="code" href="class_NL3D_CExpandLightmap.html#m2">00212</a> uint32 Width; +00213 +00214 <font class="comment">// Height of the array</font> +<a name="l00215"></a><a class="code" href="class_NL3D_CExpandLightmap.html#m3">00215</a> uint32 Height; +00216 +00217 <font class="comment">// Mul factor for the size (1, 2 or 4)</font> +<a name="l00218"></a><a class="code" href="class_NL3D_CExpandLightmap.html#m4">00218</a> uint32 MulFactor; +00219 +00220 <font class="comment">// Static light color</font> +<a name="l00221"></a><a class="code" href="class_NL3D_CExpandLightmap.html#m5">00221</a> <font class="keyword">const</font> <a class="code" href="class_NLMISC__CRGBA.html">NLMISC::CRGBA</a>* StaticLightColor; +00222 +00223 <font class="comment">// Destination array</font> +<a name="l00224"></a><a class="code" href="class_NL3D_CExpandLightmap.html#m6">00224</a> <a class="code" href="class_NLMISC__CRGBA.html">NLMISC::CRGBA</a>* DstPixels; +00225 }; +00226 +00227 <font class="comment">// Extern ASM functions</font> +00228 <font class="keyword">extern</font> <font class="stringliteral">"C"</font> <font class="keywordtype">void</font> <a class="code" href="texture_far_h.html#a4">NL3D_expandLightmap</a> (<font class="keyword">const</font> <a class="code" href="class_NL3D_CExpandLightmap.html">NL3D_CExpandLightmap</a>* pLightmap); +00229 <font class="keyword">extern</font> <font class="stringliteral">"C"</font> <font class="keywordtype">void</font> <a class="code" href="texture_far_h.html#a5">NL3D_drawFarTileInFarTexture</a> (<font class="keyword">const</font> <a class="code" href="class_NL3D_CComputeTileFar.html">NL3D_CComputeTileFar</a>* pTileFar); +00230 <font class="keyword">extern</font> <font class="stringliteral">"C"</font> <font class="keywordtype">void</font> <a class="code" href="texture_far_h.html#a6">NL3D_drawFarTileInFarTextureAdditive</a> (<font class="keyword">const</font> <a class="code" href="class_NL3D_CComputeTileFar.html">NL3D_CComputeTileFar</a>* pTileFar); +00231 <font class="keyword">extern</font> <font class="stringliteral">"C"</font> <font class="keywordtype">void</font> <a class="code" href="texture_far_h.html#a7">NL3D_drawFarTileInFarTextureAlpha</a> (<font class="keyword">const</font> <a class="code" href="class_NL3D_CComputeTileFar.html">NL3D_CComputeTileFar</a>* pTileFar); +00232 <font class="keyword">extern</font> <font class="stringliteral">"C"</font> <font class="keywordtype">void</font> <a class="code" href="texture_far_h.html#a8">NL3D_drawFarTileInFarTextureAdditiveAlpha</a> (<font class="keyword">const</font> <a class="code" href="class_NL3D_CComputeTileFar.html">NL3D_CComputeTileFar</a>* pTileFar); +00233 +00234 <font class="preprocessor">#endif // NL_TEXTURE_FAR_H +</font>00235 <font class="preprocessor"></font> +00236 <font class="comment">/* End of texture_far.h */</font> +</div></pre> + +<!-- footer --> +<BR><FONT Size=+5> </FONT> +</TD> +<TD WIDTH=15><IMG SRC=http://www.nevrax.org/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD> +</TR> +</TABLE> +</BODY> +</HTML> |