aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/texture_8h-source.html
blob: 24418dffe4d912512862e2f7e6e341c5e56cb1cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
<!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="/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="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=140 BGCOLOR=#dddddd><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD><IMG width=6 height=14 SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF='/'><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
        <TD><IMG  width=6 height=14  SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF='/'><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
 </TR>
</TABLE> 

<!-- banner Nevrax -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0 WIDTH=100%>
 <TR><TD  BGCOLOR="#000000" BACKGROUND="/inc/img/black_banner.jpg"><A HREF=""><IMG  SRC="/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="/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
	<TD WIDTH=140   BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG  SRC="/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="/news/" TITLE="Rubrique news"><img width=13 height=15  hspace=5 border=0 src=/inc/img/picto-news.gif ALT=#></A></td><td><a  class='linkbox' href="/news/" TITLE="News">News</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/mail/" TITLE="Rubrique mail"><img width=15 height=11  hspace=5 border=0 src=/inc/img/picto-mail.gif ALT=#></A></td><td><a  class='linkbox' href="/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/docs/" TITLE="Rubrique docs"><img width=14 height=16  hspace=5 border=0 src=/inc/img/picto-docs.gif ALT=#></A></td><td><a  class='linkbox' href="/docs/" TITLE="Documentation">Documentation</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/cvs/" TITLE="Rubrique cvs"><img width=13 height=17  hspace=5 border=0 src=/inc/img/picto-cvs.gif ALT=#></A></td><td><a  class='linkbox' href="/cvs/" TITLE="CVS Web">CVS</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/bugs/" TITLE="Rubrique bugs"><img width=20 height=16  hspace=5 border=0 src=/inc/img/picto-bugs.gif ALT=#></A></td><td><a  class='linkbox' href="/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/GPL.php3" TITLE="Rubrique license"><img  width=18 height=12   hspace=5 border=0 src=/inc/img/picto-gpl.gif ALT=#></A></td><td><a  class='linkbox' href="/GPL.php3" TITLE="License">License</a></td></tr>
		</TABLE>
		</TD></TR></TABLE></TD></TR></TABLE>
		<!------ End Box  ------>

	</TD>
	<TD WIDTH=15><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
	<TD ALIGN=left valign=top><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">

<!-- title -->
<TABLE  background="/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0  BORDER=0 width=100%><tr><td>
<A HREF="/docs/"><img src="/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
</td><td><IMG  SRC="/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
</td></tr></table>
&nbsp;

<!-- 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="/inc/img/reddots.gif"></TD>
	<TD><B>Documentation</B></TD>
	<TD ALIGN=RIGHT>&nbsp;</td>
</tr></table>
<!-- Generated by Doxygen 1.2.14 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindexRef" doxygen="_cgi:/cgi-bin/nel-search.cgi" href="/cgi-bin/nel-search.cgi">Search</a> &nbsp; </center>
<hr><h1>texture.h</h1><a href="texture_8h.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_H</font>
00027 <font class="preprocessor"></font><font class="preprocessor">#define NL_TEXTURE_H</font>
00028 <font class="preprocessor"></font>
00029 <font class="preprocessor">#include "<a class="code" href="types__nl_8h.html">nel/misc/types_nl.h</a>"</font>
00030 <font class="preprocessor">#include "<a class="code" href="smart__ptr_8h.html">nel/misc/smart_ptr.h</a>"</font>
00031 <font class="preprocessor">#include "<a class="code" href="stream_8h.html">nel/misc/stream.h</a>"</font>
00032 <font class="preprocessor">#include "<a class="code" href="rect_8h.html">nel/misc/rect.h</a>"</font>
00033 <font class="preprocessor">#include "<a class="code" href="bitmap_8h.html">nel/misc/bitmap.h</a>"</font>
00034 <font class="preprocessor">#include &lt;string&gt;</font>
00035 <font class="preprocessor">#include &lt;list&gt;</font>
00036 <font class="preprocessor">#include &lt;map&gt;</font>
00037 
00038 
00039 <font class="keyword">namespace </font>NL3D 
00040 {
00041 
00042 
00043 <font class="keyword">using</font> <a class="code" href="classNLMISC_1_1CBitmap.html">NLMISC::CBitmap</a>;
00044 
00045 
00046 <font class="keyword">class   </font>IDriver;
00047 
00048 
00049 <font class="comment">//****************************************************************************</font>
00050 
00051 <font class="comment">// List typedef.</font>
00052 <font class="keyword">class   </font>ITextureDrvInfos;
00053 <font class="keyword">class   </font>CTextureDrvShare;
<a name="l00054"></a><a class="code" href="classNL3D_1_1TTexDrvInfoPtrMap.html">00054</a> <font class="keyword">class </font>TTexDrvInfoPtrMap : <font class="keyword">public</font> std::map&lt; std::string, ITextureDrvInfos*&gt; {};
00055 <font class="keyword">typedef</font> <a class="code" href="classstd_1_1list.html">std::list&lt;CTextureDrvShare*&gt;</a>            <a class="code" href="namespaceNL3D.html#a245">TTexDrvSharePtrList</a>;
00056 <font class="keyword">typedef</font> TTexDrvInfoPtrMap::iterator                     <a class="code" href="namespaceNL3D.html#a246">ItTexDrvInfoPtrMap</a>;
00057 <font class="keyword">typedef</font> TTexDrvSharePtrList::iterator           <a class="code" href="namespaceNL3D.html#a247">ItTexDrvSharePtrList</a>;
00058 
00059 
00060 <font class="comment">// Class for interaction of textures with Driver.</font>
00061 <font class="comment">// ITextureDrvInfos represent the real data of the texture, stored into the driver (eg: just a GLint for opengl).</font>
<a name="l00062"></a><a class="code" href="classNL3D_1_1ITextureDrvInfos.html">00062</a> <font class="keyword">class </font>ITextureDrvInfos : <font class="keyword">public</font> NLMISC::CRefCount
00063 {
00064 <font class="keyword">private</font>:
<a name="l00065"></a><a class="code" href="classNL3D_1_1ITextureDrvInfos.html#o0">00065</a>         IDriver                                 *<a class="code" href="classNL3D_1_1ITextureDrvInfos.html#o0">_Driver</a>;
<a name="l00066"></a><a class="code" href="classNL3D_1_1ITextureDrvInfos.html#o1">00066</a>         <a class="code" href="namespaceNL3D.html#a246">ItTexDrvInfoPtrMap</a>              <a class="code" href="classNL3D_1_1ITextureDrvInfos.html#o1">_DriverIterator</a>;
00067 
00068 <font class="keyword">public</font>:
<a name="l00069"></a><a class="code" href="classNL3D_1_1ITextureDrvInfos.html#a0">00069</a>         <a class="code" href="classNL3D_1_1ITextureDrvInfos.html#a0">ITextureDrvInfos</a>(IDriver *drv, <a class="code" href="namespaceNL3D.html#a246">ItTexDrvInfoPtrMap</a> it) {<a class="code" href="classNL3D_1_1ITextureDrvInfos.html#o0">_Driver</a>= drv; <a class="code" href="classNL3D_1_1ITextureDrvInfos.html#o1">_DriverIterator</a>= it;}
00070         <a class="code" href="classNL3D_1_1ITextureDrvInfos.html#a0">ITextureDrvInfos</a>(<font class="keyword">class</font> IDriver&amp; driver);
00071         <font class="keyword">virtual</font> <a class="code" href="classNL3D_1_1ITextureDrvInfos.html#a2">~ITextureDrvInfos</a>(<font class="keywordtype">void</font>);
00072 };
00073 
00074 <font class="comment">// Many ITexture may point to the same ITextureDrvInfos, through CTextureDrvShare.</font>
<a name="l00075"></a><a class="code" href="classNL3D_1_1CTextureDrvShare.html">00075</a> <font class="keyword">class </font>CTextureDrvShare : <font class="keyword">public</font> NLMISC::CRefCount
00076 {
00077 <font class="keyword">private</font>:
<a name="l00078"></a><a class="code" href="classNL3D_1_1CTextureDrvShare.html#o0">00078</a>         IDriver                                 *<a class="code" href="classNL3D_1_1CTextureDrvShare.html#o0">_Driver</a>;
<a name="l00079"></a><a class="code" href="classNL3D_1_1CTextureDrvShare.html#o1">00079</a>         <a class="code" href="namespaceNL3D.html#a247">ItTexDrvSharePtrList</a>    <a class="code" href="classNL3D_1_1CTextureDrvShare.html#o1">_DriverIterator</a>;
00080 
00081 <font class="keyword">public</font>:
<a name="l00082"></a><a class="code" href="classNL3D_1_1CTextureDrvShare.html#m0">00082</a>         <a class="code" href="classNLMISC_1_1CSmartPtr.html">NLMISC::CSmartPtr&lt;ITextureDrvInfos&gt;</a>             <a class="code" href="classNL3D_1_1CTextureDrvShare.html#m0">DrvTexture</a>;
00083 
00084 <font class="keyword">public</font>:
<a name="l00085"></a><a class="code" href="classNL3D_1_1CTextureDrvShare.html#a0">00085</a>         <a class="code" href="classNL3D_1_1CTextureDrvShare.html#a0">CTextureDrvShare</a>(IDriver *drv, <a class="code" href="namespaceNL3D.html#a247">ItTexDrvSharePtrList</a> it) {<a class="code" href="classNL3D_1_1CTextureDrvShare.html#o0">_Driver</a>= drv; <a class="code" href="classNL3D_1_1CTextureDrvShare.html#o1">_DriverIterator</a>= it;}
00086         <a class="code" href="classNL3D_1_1CTextureDrvShare.html#a1">~CTextureDrvShare</a>();
00087 };
00088 
00089 
00090 <font class="comment">//****************************************************************************</font>
00100 <font class="comment"></font><font class="comment">/* *** IMPORTANT ********************</font>
00101 <font class="comment"> * *** IF YOU MODIFY THE STRUCTURE OF THIS CLASS, PLEASE INCREMENT IDriver::InterfaceVersion TO INVALIDATE OLD DRIVER DLL</font>
00102 <font class="comment"> * **********************************</font>
00103 <font class="comment"> */</font>
<a name="l00104"></a><a class="code" href="classNL3D_1_1ITexture.html">00104</a> <font class="keyword">class </font>ITexture : <font class="keyword">public</font> CBitmap, <font class="keyword">public</font> NLMISC::CRefCount, <font class="keyword">public</font> NLMISC::IStreamable
00105 {
00106 <font class="keyword">public</font>:
00107         <font class="comment">// Those enums MUST be the same than in UTexture!!</font>
00108 
<a name="l00109"></a><a class="code" href="classNL3D_1_1ITexture.html#s28">00109</a>         <font class="keyword">enum</font>    <a class="code" href="classNL3D_1_1ITexture.html#s28">TWrapMode</a>
00110         {
00111                 <a class="code" href="classNL3D_1_1ITexture.html#s28s0">Repeat</a>= 0,
00112                 <a class="code" href="classNL3D_1_1ITexture.html#s28s1">Clamp</a>,
00113 
00114                 <a class="code" href="classNL3D_1_1ITexture.html#s28s2">WrapModeCount</a>
00115         };
00116 
<a name="l00117"></a><a class="code" href="classNL3D_1_1ITexture.html#s29">00117</a>         <font class="keyword">enum</font>    <a class="code" href="classNL3D_1_1ITexture.html#s29">TUploadFormat</a>
00118         {
00119                 <a class="code" href="classNL3D_1_1ITexture.html#s29s3">Auto</a>= 0,
00120                 <a class="code" href="classNL3D_1_1ITexture.html#s29s4">RGBA8888</a>,
00121                 <a class="code" href="classNL3D_1_1ITexture.html#s29s5">RGBA4444</a>,
00122                 <a class="code" href="classNL3D_1_1ITexture.html#s29s6">RGBA5551</a>,
00123                 <a class="code" href="classNL3D_1_1ITexture.html#s29s7">RGB888</a>,
00124                 <a class="code" href="classNL3D_1_1ITexture.html#s29s8">RGB565</a>,
00125                 <a class="code" href="classNL3D_1_1ITexture.html#s29s9">DXTC1</a>,
00126                 <a class="code" href="classNL3D_1_1ITexture.html#s29s10">DXTC1Alpha</a>,
00127                 <a class="code" href="classNL3D_1_1ITexture.html#s29s11">DXTC3</a>,
00128                 <a class="code" href="classNL3D_1_1ITexture.html#s29s12">DXTC5</a>,
00129                 <a class="code" href="classNL3D_1_1ITexture.html#s29s13">Luminance</a>,
00130                 <a class="code" href="classNL3D_1_1ITexture.html#s29s14">Alpha</a>,
00131                 <a class="code" href="classNL3D_1_1ITexture.html#s29s15">AlphaLuminance</a>,
00132                 <a class="code" href="classNL3D_1_1ITexture.html#s29s16">DsDt</a>,
00133                 <a class="code" href="classNL3D_1_1ITexture.html#s29s17">UploadFormatCount</a>
00134         };
00135 
00136 
<a name="l00140"></a><a class="code" href="classNL3D_1_1ITexture.html#s30">00140</a>         <font class="keyword">enum</font>    <a class="code" href="classNL3D_1_1ITexture.html#s30">TMagFilter</a>
00141         {
00142                 <a class="code" href="classNL3D_1_1ITexture.html#s30s18">Nearest</a>=0,
00143                 <a class="code" href="classNL3D_1_1ITexture.html#s30s19">Linear</a>,
00144 
00145                 <a class="code" href="classNL3D_1_1ITexture.html#s30s20">MagFilterCount</a>
00146         };
00147 
<a name="l00151"></a><a class="code" href="classNL3D_1_1ITexture.html#s31">00151</a>         <font class="keyword">enum</font>    <a class="code" href="classNL3D_1_1ITexture.html#s31">TMinFilter</a>
00152         {
00153                 <a class="code" href="classNL3D_1_1ITexture.html#s31s21">NearestMipMapOff</a>=0,
00154                 <a class="code" href="classNL3D_1_1ITexture.html#s31s22">NearestMipMapNearest</a>,
00155                 <a class="code" href="classNL3D_1_1ITexture.html#s31s23">NearestMipMapLinear</a>,
00156                 <a class="code" href="classNL3D_1_1ITexture.html#s31s24">LinearMipMapOff</a>,
00157                 <a class="code" href="classNL3D_1_1ITexture.html#s31s25">LinearMipMapNearest</a>,
00158                 <a class="code" href="classNL3D_1_1ITexture.html#s31s26">LinearMipMapLinear</a>,
00159 
00160                 <a class="code" href="classNL3D_1_1ITexture.html#s31s27">MinFilterCount</a>
00161         };
00162 
00163 
00164 <font class="keyword">public</font>:
00165 
00167         <font class="comment">// @{</font>
00169 <font class="comment">        ITexture();</font>
<a name="l00171"></a><a class="code" href="classNL3D_1_1ITexture.html#z825_1">00171</a> <font class="comment">        ITexture(const ITexture &amp;tex) {operator=(tex);}</font>
00173 <font class="comment">        virtual ~ITexture();</font>
00175 <font class="comment">        ITexture &amp;operator=(const ITexture &amp;tex);</font>
00176         <font class="comment">// @}</font>
00177 
00178 
00180 
00193         <font class="comment">// @{</font>
<a name="l00194"></a><a class="code" href="classNL3D_1_1ITexture.html#z826_0">00194</a>         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1ITexture.html#z826_0">setWrapS</a>(<a class="code" href="classNL3D_1_1ITexture.html#s28">TWrapMode</a> mode) {<a class="code" href="classNL3D_1_1ITexture.html#o3">_WrapS</a>= mode;}
<a name="l00195"></a><a class="code" href="classNL3D_1_1ITexture.html#z826_1">00195</a>         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1ITexture.html#z826_1">setWrapT</a>(<a class="code" href="classNL3D_1_1ITexture.html#s28">TWrapMode</a> mode) {<a class="code" href="classNL3D_1_1ITexture.html#o4">_WrapT</a>= mode;}
<a name="l00196"></a><a class="code" href="classNL3D_1_1ITexture.html#z826_2">00196</a>         <a class="code" href="classNL3D_1_1ITexture.html#s28">TWrapMode</a>               <a class="code" href="classNL3D_1_1ITexture.html#z826_2">getWrapS</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1ITexture.html#o3">_WrapS</a>;}
<a name="l00197"></a><a class="code" href="classNL3D_1_1ITexture.html#z826_3">00197</a>         <a class="code" href="classNL3D_1_1ITexture.html#s28">TWrapMode</a>               <a class="code" href="classNL3D_1_1ITexture.html#z826_3">getWrapT</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1ITexture.html#o4">_WrapT</a>;}
00203         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1ITexture.html#z826_4">setUploadFormat</a>(<a class="code" href="classNL3D_1_1ITexture.html#s29">TUploadFormat</a> pf);
<a name="l00204"></a><a class="code" href="classNL3D_1_1ITexture.html#z826_5">00204</a>         <a class="code" href="classNL3D_1_1ITexture.html#s29">TUploadFormat</a>   <a class="code" href="classNL3D_1_1ITexture.html#z826_5">getUploadFormat</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1ITexture.html#o2">_UploadFormat</a>;}
00205         <font class="keyword">virtual</font>         <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1ITexture.html#z826_6">setFilterMode</a>(<a class="code" href="classNL3D_1_1ITexture.html#s30">TMagFilter</a> magf, <a class="code" href="classNL3D_1_1ITexture.html#s31">TMinFilter</a> minf);
<a name="l00206"></a><a class="code" href="classNL3D_1_1ITexture.html#z826_7">00206</a>         <a class="code" href="classNL3D_1_1ITexture.html#s30">TMagFilter</a>              <a class="code" href="classNL3D_1_1ITexture.html#z826_7">getMagFilter</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1ITexture.html#o6">_MagFilter</a>;}
<a name="l00207"></a><a class="code" href="classNL3D_1_1ITexture.html#z826_8">00207</a>         <a class="code" href="classNL3D_1_1ITexture.html#s31">TMinFilter</a>              <a class="code" href="classNL3D_1_1ITexture.html#z826_8">getMinFilter</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1ITexture.html#o5">_MinFilter</a>;}
<a name="l00208"></a><a class="code" href="classNL3D_1_1ITexture.html#z826_9">00208</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1ITexture.html#z826_9">mipMapOff</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1ITexture.html#o5">_MinFilter</a>==<a class="code" href="classNL3D_1_1ITexture.html#s31s21">NearestMipMapOff</a> || <a class="code" href="classNL3D_1_1ITexture.html#o5">_MinFilter</a>==<a class="code" href="classNL3D_1_1ITexture.html#s31s24">LinearMipMapOff</a>;}
<a name="l00209"></a><a class="code" href="classNL3D_1_1ITexture.html#z826_10">00209</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1ITexture.html#z826_10">mipMapOn</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> !<a class="code" href="classNL3D_1_1ITexture.html#z826_9">mipMapOff</a>();}
00210         <font class="comment">// @}</font>
00211 
00212 
<a name="l00219"></a><a class="code" href="classNL3D_1_1ITexture.html#a0">00219</a>         <font class="keywordtype">void</font>    <a class="code" href="classNL3D_1_1ITexture.html#a0">touch</a>() 
00220         { 
00221                 <a class="code" href="classNL3D_1_1ITexture.html#m1">_ListInvalidRect</a>.clear (); 
00222                 <a class="code" href="classNL3D_1_1ITexture.html#n0">_Touched</a>=<font class="keyword">true</font>; 
00223                 <a class="code" href="classNL3D_1_1ITexture.html#o0">_GoodGenerate</a>= <font class="keyword">false</font>;
00224         }
00225 
<a name="l00234"></a><a class="code" href="classNL3D_1_1ITexture.html#a1">00234</a>         <font class="keywordtype">void</font>    <a class="code" href="classNL3D_1_1ITexture.html#a1">touchRect</a>(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CRect.html">NLMISC::CRect</a>&amp; rect) 
00235         { 
00236                 <font class="comment">// The texture must not support sharing....</font>
00237                 <a class="code" href="debug_8h.html#a6">nlassert</a>(!<a class="code" href="classNL3D_1_1ITexture.html#a7">supportSharing</a>());
00238                 <font class="comment">// Don't invalidate the rectangle if the full texture is already invalidated.</font>
00239                 <font class="keywordflow">if</font> (!<a class="code" href="classNL3D_1_1ITexture.html#a16">isAllInvalidated</a> ())
00240                 {
00241                         <font class="comment">// Add the region to invalidate list</font>
00242                         <a class="code" href="classNL3D_1_1ITexture.html#m1">_ListInvalidRect</a>.push_back (rect); 
00243                         <font class="comment">// Touch flag</font>
00244                         <a class="code" href="classNL3D_1_1ITexture.html#n0">_Touched</a>=<font class="keyword">true</font>; 
00245                 }
00246 
00247                 <a class="code" href="classNL3D_1_1ITexture.html#o0">_GoodGenerate</a>= <font class="keyword">false</font>;
00248         }
00249 
00250         
<a name="l00259"></a><a class="code" href="classNL3D_1_1ITexture.html#a2">00259</a>         <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1ITexture.html#a2">getReleasable</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1ITexture.html#o1">_Releasable</a>; }
00260 
00261 
<a name="l00270"></a><a class="code" href="classNL3D_1_1ITexture.html#a3">00270</a>         <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1ITexture.html#a3">setReleasable</a>(<font class="keywordtype">bool</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>) { <a class="code" href="classNL3D_1_1ITexture.html#o1">_Releasable</a> = <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>; }
00271 
<a name="l00295"></a><a class="code" href="classNL3D_1_1ITexture.html#a4">00295</a>         <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1ITexture.html#a4">generate</a>()
00296         {
00297                 <font class="keywordflow">if</font>(!<a class="code" href="classNL3D_1_1ITexture.html#o0">_GoodGenerate</a>)
00298                 {
00299                         <a class="code" href="classNL3D_1_1ITexture.html#b0">doGenerate</a>();
00300                         <a class="code" href="classNL3D_1_1ITexture.html#o0">_GoodGenerate</a>=<font class="keyword">true</font>;
00301                 }
00302         }
00303 
<a name="l00308"></a><a class="code" href="classNL3D_1_1ITexture.html#a5">00308</a>         <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1ITexture.html#a5">validateGenerateFlag</a>() {<a class="code" href="classNL3D_1_1ITexture.html#o0">_GoodGenerate</a>=<font class="keyword">true</font>;}
00309 
<a name="l00313"></a><a class="code" href="classNL3D_1_1ITexture.html#a6">00313</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1ITexture.html#a6">release</a>() { <a class="code" href="classNLMISC_1_1CBitmap.html#a13">reset</a>(); <a class="code" href="classNL3D_1_1ITexture.html#o0">_GoodGenerate</a>= <font class="keyword">false</font>; }
00314 
<a name="l00318"></a><a class="code" href="classNL3D_1_1ITexture.html#a7">00318</a>         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1ITexture.html#a7">supportSharing</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <font class="keyword">false</font>;}
00319 
<a name="l00324"></a><a class="code" href="classNL3D_1_1ITexture.html#a8">00324</a>         <font class="keyword">virtual</font> std::string             <a class="code" href="classNL3D_1_1ITexture.html#a8">getShareName</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> std::string();}
00325 
<a name="l00329"></a><a class="code" href="classNL3D_1_1ITexture.html#a9">00329</a>         <font class="keywordtype">bool</font>    <a class="code" href="classNL3D_1_1ITexture.html#a9">setupedIntoDriver</a>()<font class="keyword"> const </font>
00330 <font class="keyword">        </font>{
00331                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1ITexture.html#m0">TextureDrvShare</a>!=NULL;
00332         }
00333 
00335         <font class="keywordtype">void</font>    <a class="code" href="classNL3D_1_1ITexture.html#a10">releaseDriverSetup</a>();
00336 
<a name="l00338"></a><a class="code" href="classNL3D_1_1ITexture.html#a11">00338</a>         <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1ITexture.html#a11">allowDegradation</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <font class="keyword">false</font>; }
00339 
00341         <font class="keyword">virtual</font> <font class="keywordtype">void</font>    <a class="code" href="classNL3D_1_1ITexture.html#a12">serial</a>(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;f) <font class="keywordflow">throw</font>(NLMISC::EStream);
00342 
<a name="l00346"></a><a class="code" href="classNL3D_1_1ITexture.html#a13">00346</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1ITexture.html#a13">selectTexture</a>(uint <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>) {}
00347 
<a name="l00349"></a><a class="code" href="classNL3D_1_1ITexture.html#a14">00349</a>         <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1ITexture.html#a14">isSelectable</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <font class="keyword">false</font>; }
00350 
<a name="l00354"></a><a class="code" href="classNL3D_1_1ITexture.html#a15">00354</a>         <font class="keyword">virtual</font> <a class="code" href="classNL3D_1_1ITexture.html#z825_0">ITexture</a> *<a class="code" href="classNL3D_1_1ITexture.html#a15">buildNonSelectableVersion</a>(uint <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>) { <font class="keywordflow">return</font> <font class="keyword">this</font>; }
00355 
00356 
00357 
00358         
00360         <font class="comment">// @{</font>
<a name="l00362"></a><a class="code" href="classNL3D_1_1ITexture.html#z827_0">00362</a> <font class="comment">                virtual bool isTextureCube() const { return false; }    </font>
00363         <font class="comment">// @}</font>
00364 
00365 <font class="comment">//****************************</font>
00366 <font class="comment">// Private part.</font>
00367 <font class="keyword">protected</font>:
00368         <font class="comment">// Derived texture should set it to true when they are updated.</font>
<a name="l00369"></a><a class="code" href="classNL3D_1_1ITexture.html#n0">00369</a>         <font class="keywordtype">bool</font>            <a class="code" href="classNL3D_1_1ITexture.html#n0">_Touched</a>;
00370 
00371 
00382         <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1ITexture.html#b0">doGenerate</a>() = 0;
00383 
00384 
00385 <font class="keyword">private</font>:
<a name="l00386"></a><a class="code" href="classNL3D_1_1ITexture.html#o0">00386</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1ITexture.html#o0">_GoodGenerate</a>;
<a name="l00387"></a><a class="code" href="classNL3D_1_1ITexture.html#o1">00387</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1ITexture.html#o1">_Releasable</a>;
<a name="l00388"></a><a class="code" href="classNL3D_1_1ITexture.html#o2">00388</a>         <a class="code" href="classNL3D_1_1ITexture.html#s29">TUploadFormat</a>   <a class="code" href="classNL3D_1_1ITexture.html#o2">_UploadFormat</a>;
<a name="l00389"></a><a class="code" href="classNL3D_1_1ITexture.html#o3">00389</a>         <a class="code" href="classNL3D_1_1ITexture.html#s28">TWrapMode</a>               <a class="code" href="classNL3D_1_1ITexture.html#o3">_WrapS</a>;
<a name="l00390"></a><a class="code" href="classNL3D_1_1ITexture.html#o4">00390</a>         <a class="code" href="classNL3D_1_1ITexture.html#s28">TWrapMode</a>               <a class="code" href="classNL3D_1_1ITexture.html#o4">_WrapT</a>;
<a name="l00391"></a><a class="code" href="classNL3D_1_1ITexture.html#o5">00391</a>         <a class="code" href="classNL3D_1_1ITexture.html#s31">TMinFilter</a>              <a class="code" href="classNL3D_1_1ITexture.html#o5">_MinFilter</a>;
<a name="l00392"></a><a class="code" href="classNL3D_1_1ITexture.html#o6">00392</a>         <a class="code" href="classNL3D_1_1ITexture.html#s30">TMagFilter</a>              <a class="code" href="classNL3D_1_1ITexture.html#o6">_MagFilter</a>;
00393 
00394 <font class="keyword">public</font>:
00395         <font class="comment">// Private Part!!!. For Driver Only.</font>
00396         <font class="comment">//==================================</font>
00397 
<a name="l00398"></a><a class="code" href="classNL3D_1_1ITexture.html#m0">00398</a>         <a class="code" href="classNLMISC_1_1CRefPtr.html">NLMISC::CRefPtr&lt;CTextureDrvShare&gt;</a>       <a class="code" href="classNL3D_1_1ITexture.html#m0">TextureDrvShare</a>;
<a name="l00404"></a><a class="code" href="classNL3D_1_1ITexture.html#m1">00404</a>         <a class="code" href="classstd_1_1list.html">std::list&lt;NLMISC::CRect&gt;</a>        <a class="code" href="classNL3D_1_1ITexture.html#m1">_ListInvalidRect</a>;
00405 
00406 
<a name="l00410"></a><a class="code" href="classNL3D_1_1ITexture.html#a16">00410</a>         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1ITexture.html#a16">isAllInvalidated</a> ()<font class="keyword"> const</font>
00411 <font class="keyword">        </font>{
00412                 <font class="keywordflow">return</font>  <a class="code" href="classNL3D_1_1ITexture.html#n0">_Touched</a>&amp;&amp;(_ListInvalidRect.begin()==_ListInvalidRect.end());
00413         }
00414 
<a name="l00420"></a><a class="code" href="classNL3D_1_1ITexture.html#a17">00420</a>         <font class="keywordtype">bool</font>    <a class="code" href="classNL3D_1_1ITexture.html#a17">touched</a> (<font class="keywordtype">void</font>)
00421         {
00422                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1ITexture.html#n0">_Touched</a>;
00423         }
00424 
00425         <font class="comment">/*</font>
00426 <font class="comment">         * Clear the touched flag and the invalid rectangle list</font>
00427 <font class="comment">         *</font>
00428 <font class="comment">         * \see isAllInvalidated(), generate(), touch(), touched(), touchRect(), _ListInvalidRect</font>
00429 <font class="comment">         */</font>
<a name="l00430"></a><a class="code" href="classNL3D_1_1ITexture.html#a18">00430</a>         <font class="keywordtype">void</font>    <a class="code" href="classNL3D_1_1ITexture.html#a18">clearTouched</a>(<font class="keywordtype">void</font>) 
00431         { 
00432                 <a class="code" href="classNL3D_1_1ITexture.html#n0">_Touched</a>=<font class="keyword">false</font>; 
00433                 _ListInvalidRect.clear();
00434         }
00435 
00436 
00437 
00438 };
00439 
00440 
00441 
00442 } <font class="comment">// NL3D</font>
00443 
00444 
00445 <font class="preprocessor">#endif // NL_TEXTURE_H</font>
00446 <font class="preprocessor"></font>
00447 <font class="comment">/* End of texture.h */</font>
</pre></div>

<!-- footer -->
<BR><FONT Size=+5>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </FONT>
</TD>
<TD WIDTH=15><IMG  SRC=/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
</TR>
</TABLE>
</BODY>
</HTML>