aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02230.html
blob: 1198f36b1889af13a6b7fe63a8d4e42c2cdc423b (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
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
<!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::CAsyncTextureManager 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&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a>  | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>NL3D::CAsyncTextureManager Class Reference</h1><code>#include &lt;<a class="el" href="a05464.html">async_texture_manager.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Async Loader of textures and Texture Load Balancer. Additionaly, store in RAM for each texture load a very low, DXTC1 compressed version of the texture. Used for some Lod systems. <dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2002 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00053">53</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera0">addTextureRef</a> (const std::string &amp;textName, <a class="el" href="a02873.html">CMeshBaseInstance</a> *instance, const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;position)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera1">CAsyncTextureManager</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#NL3D_1_1CAsyncTextureManagera1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a02268.html">NLMISC::CBitmap</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera2">getCoarseBitmap</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a564">id</a>) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera3">getLastTextureSizeGot</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get what the system really allows  <a href="#NL3D_1_1CAsyncTextureManagera3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera4">getTotalTextureSizeAsked</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the async texture Size asked (ie maybe bigger than MaxTotalTextureSize).  <a href="#NL3D_1_1CAsyncTextureManagera4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera5">isTextureUpLoaded</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a564">id</a>) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">tells if a texture is loaded in the driver (ie ready to use)  <a href="#NL3D_1_1CAsyncTextureManagera5"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera6">releaseTexture</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a564">id</a>, <a class="el" href="a02873.html">CMeshBaseInstance</a> *instance)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">release a texture-instance tuple. the texture is released if no more instance use it.  <a href="#NL3D_1_1CAsyncTextureManagera6"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera7">setupLod</a> (<a class="el" href="a04558.html#a15">uint</a> baseLevel, <a class="el" href="a04558.html#a15">uint</a> maxLevel)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera8">setupMaxHLSColoringPerFrame</a> (<a class="el" href="a04558.html#a15">uint</a> maxCol)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Setup max texture HLS Coloring per <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera11">update()</a> call (in bytes). Default to 20K.  <a href="#NL3D_1_1CAsyncTextureManagera8"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera9">setupMaxTotalTextureSize</a> (<a class="el" href="a04558.html#a15">uint</a> maxText)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Setup max total texture size allowed. Default is 10Mo.  <a href="#NL3D_1_1CAsyncTextureManagera9"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera10">setupMaxUploadPerFrame</a> (<a class="el" href="a04558.html#a15">uint</a> maxup)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Setup max texture upload in driver per <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera11">update()</a> call (in bytes). Default to 64K.  <a href="#NL3D_1_1CAsyncTextureManagera10"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera11">update</a> (<a class="el" href="a02434.html">IDriver</a> *pDriver)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera12">~CAsyncTextureManager</a> ()</td></tr>

<tr><td colspan=2><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02638.html">CHLSTextureManager</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagero0">HLSManager</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">User is free to add bank to this manager. Other methods are used by the async manager.  <a href="#NL3D_1_1CAsyncTextureManagero0"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef TTextureEntryMap::iterator&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagery0">ItTextureEntryMap</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::map&lt; std::string,<br>
 <a class="el" href="a04558.html#a15">uint</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagery1">TTextureEntryMap</a></td></tr>

<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerd0">deleteTexture</a> (<a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a04223.html#a564">id</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerd1">getNextTextureToUpLoad</a> (<a class="el" href="a04558.html#a15">uint</a> &amp;nTotalColored, <a class="el" href="a02434.html">IDriver</a> *pDriver)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerd2">updateTextureLodSystem</a> (<a class="el" href="a02434.html">IDriver</a> *pDriver)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerd3">uploadTexturePart</a> (<a class="el" href="a03487.html">ITexture</a> *pText, <a class="el" href="a02434.html">IDriver</a> *pDriver, <a class="el" href="a04558.html#a15">uint</a> &amp;nTotalUpload)</td></tr>

<tr><td colspan=2><br><h2>Static Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerh0">validDXTCMipMap</a> (<a class="el" href="a03487.html">ITexture</a> *pText)</td></tr>

<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr0">_BaseLodLevel</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02233.html">CTextureLod</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02231.html">CTextureBase</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr3">_CurrentUploadTextureLine</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">_CurrentUploadTextureMipMap</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a04558.html#a15">uint</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">_FreeTextureIds</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr6">_LastTextureSizeGot</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr7">_MaxHLSColoringPerFrame</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr8">_MaxLodLevel</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr9">_MaxTotalTextureSize</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">_MaxUploadPerFrame</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a02232.html">CTextureEntry</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagery1">TTextureEntryMap</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">_TextureEntryMap</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr13">_TotalTextureSizeAsked</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a04558.html#a15">uint</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a></td></tr>

</table>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagery0" doxytag="NL3D::CAsyncTextureManager::ItTextureEntryMap" ></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 TTextureEntryMap::iterator <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagery0">NL3D::CAsyncTextureManager::ItTextureEntryMap</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00122">122</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagery1" doxytag="NL3D::CAsyncTextureManager::TTextureEntryMap" ></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&lt;std::string, <a class="el" href="a04558.html#a15">uint</a>&gt; <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagery1">NL3D::CAsyncTextureManager::TTextureEntryMap</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00121">121</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.    </td>
  </tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagera1" doxytag="NL3D::CAsyncTextureManager::CAsyncTextureManager" ></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::CAsyncTextureManager::CAsyncTextureManager </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor. 
<p>

<p>
Definition at line <a class="el" href="a05463.html#l00104">104</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00213">_BaseLodLevel</a>, <a class="el" href="a05464.html#l00232">_CurrentTextureLodLoaded</a>, <a class="el" href="a05464.html#l00227">_CurrentUploadTexture</a>, <a class="el" href="a05464.html#l00218">_LastTextureSizeGot</a>, <a class="el" href="a05464.html#l00215">_MaxHLSColoringPerFrame</a>, <a class="el" href="a05464.html#l00213">_MaxLodLevel</a>, <a class="el" href="a05464.html#l00216">_MaxTotalTextureSize</a>, <a class="el" href="a05464.html#l00214">_MaxUploadPerFrame</a>, and <a class="el" href="a05464.html#l00217">_TotalTextureSizeAsked</a>.
<p>
<div class="fragment"><pre>00105 {
00106         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr0">_BaseLodLevel</a>= 3;
00107         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr8">_MaxLodLevel</a>= 1;
00108         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">_MaxUploadPerFrame</a>= 65536;
00109         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr7">_MaxHLSColoringPerFrame</a>= 20*1024;
00110         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= NULL;
00111         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr9">_MaxTotalTextureSize</a>= 10*1024*1024;
00112         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr13">_TotalTextureSizeAsked</a>= 0;
00113         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr6">_LastTextureSizeGot</a>= 0;
00114 
00115         <span class="comment">// Do not share this texture, to force uploading of the lods.</span>
00116         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>= NULL;
00117 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagera12" doxytag="NL3D::CAsyncTextureManager::~CAsyncTextureManager" ></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::CAsyncTextureManager::~<a class="el" href="a02230.html">CAsyncTextureManager</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05463.html#l00089">89</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00232">_CurrentTextureLodLoaded</a>, <a class="el" href="a05464.html#l00227">_CurrentUploadTexture</a>, <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05464.html#l00223">_TextureEntryMap</a>, <a class="el" href="a05464.html#l00224">_WaitingTextures</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00090 {
00091         <span class="comment">// For all remaining textures, delete them.</span>
00092         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i&lt;<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size();i++)
00093         {
00094                 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[i])
00095                         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerd0">deleteTexture</a>(i);
00096         }
00097 
00098         <span class="comment">// there must be no waitting textures, nor map, nor current upload texture</span>
00099         <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.empty() &amp;&amp; <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">_TextureEntryMap</a>.empty() &amp;&amp; <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>==NULL 
00100                 &amp;&amp; <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>==NULL);
00101 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagera0" doxytag="NL3D::CAsyncTextureManager::addTextureRef" ></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#a15">uint</a> NL3D::CAsyncTextureManager::addTextureRef </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>textName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02873.html">CMeshBaseInstance</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>instance</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>position</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Add a reference to a texture owned by an instance. If the texture still exist, only the refcount is incremented Else If texture is found in the HLSTextureManager, it is builded (async) from it, else Begin Async loading<p>
ThereFore, only <a class="el" href="a03502.html">CTextureFile</a> are possible. Note also that the texture is uploaded with mipmap by default, and UpLoadFormat is also default (say <a class="el" href="a03487.html#NL3D_1_1ITexturew32NL3D_1_1ITexturew2">ITexture::Auto</a>)<p>
If the texture file is not a DDS with mipmap, this is an error. But the system doens't fail and the file is entirely loaded and uploaded. The problem is that upload is not cut according to maxUpLoadPerFrame, so some freeze may occur.
<p>
Definition at line <a class="el" href="a05463.html#l00151">151</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05994.html#l00237">NL3D::CMeshBaseInstance::_AsyncTextureToLoadRefCount</a>, <a class="el" href="a05464.html#l00213">_BaseLodLevel</a>, <a class="el" href="a05464.html#l00222">_FreeTextureIds</a>, <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05464.html#l00223">_TextureEntryMap</a>, <a class="el" href="a05464.html#l00224">_WaitingTextures</a>, <a class="el" href="a05794.html#l00077">NL3D::CHLSTextureManager::findTexture()</a>, <a class="el" href="a05464.html#l00057">HLSManager</a>, <a class="el" href="a05464.html#l00191">NL3D::CAsyncTextureManager::CTextureEntry::Instances</a>, <a class="el" href="a05464.html#l00122">ItTextureEntryMap</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</a>, <a class="el" href="a05464.html#l00130">NL3D::CAsyncTextureManager::CTextureBase::Texture</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05464.html#l00180">NL3D::CAsyncTextureManager::CTextureEntry::UpLoaded</a>.
<p>
Referenced by <a class="el" href="a05993.html#l00445">NL3D::CMeshBaseInstance::startAsyncTextureLoading()</a>.
<p>
<div class="fragment"><pre>00152 {
00153         <a class="code" href="a04558.html#a15">uint</a>    ret;
00154 
00155         <span class="comment">// strlwr name</span>
00156         string  textName= textNameNotLwr;
00157         <a class="code" href="a05378.html#a273">strlwr</a>(textName);
00158 
00159         <span class="comment">// find the texture in map</span>
00160         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagery0">ItTextureEntryMap</a>       it;
00161         it= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">_TextureEntryMap</a>.find(textName);
00162 
00163         <span class="comment">// not found, create.</span>
00164         <span class="keywordflow">if</span>(it==<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">_TextureEntryMap</a>.end())
00165         {
00166                 <span class="comment">// search a free id.</span>
00167                 <a class="code" href="a04558.html#a15">uint</a>    i= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size();
00168                 <span class="keywordflow">if</span>(!<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">_FreeTextureIds</a>.empty())
00169                 {
00170                         i= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">_FreeTextureIds</a>.back();
00171                         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">_FreeTextureIds</a>.pop_back();
00172                 }
00173                 <span class="comment">// resize if needed.</span>
00174                 <span class="keywordflow">if</span>(i&gt;=<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size())
00175                 {
00176                         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.push_back(NULL);
00177                         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">_FreeTextureIds</a>.reserve(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.capacity());
00178                 }
00179 
00180                 <span class="comment">// alloc new.</span>
00181                 CTextureEntry   *text= <span class="keyword">new</span> CTextureEntry();
00182                 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[i]= text;
00183                 text-&gt;Texture= <span class="keyword">new</span> CTextureFile;
00184                 <span class="comment">// Do not allow degradation.</span>
00185                 text-&gt;Texture-&gt;setAllowDegradation(<span class="keyword">false</span>);
00186 
00187                 <span class="comment">// add to map.</span>
00188                 it= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">_TextureEntryMap</a>.insert(make_pair(textName, i)).first;
00189                 <span class="comment">// bkup the it for deletion</span>
00190                 text-&gt;ItMap= it;
00191 
00192                 <span class="comment">// Start Color or Async loading.</span>
00193                 text-&gt;Texture-&gt;setFileName(textName);
00194                 <span class="comment">// First try with the HLSManager</span>
00195                 <a class="code" href="a04558.html#a14">sint</a>    colorTextId= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagero0">HLSManager</a>.findTexture(textName);
00196                 <span class="comment">// If found</span>
00197                 <span class="keywordflow">if</span>(colorTextId!=-1)
00198                 {
00199                         <span class="comment">// Mark the texture as Loaded, and ready to colorize (done in update()).</span>
00200                         text-&gt;Loaded= <span class="keyword">true</span>;
00201                         text-&gt;BuildFromHLSManager= <span class="keyword">true</span>;
00202                         text-&gt;HLSManagerTextId= colorTextId;
00203                 }
00204                 <span class="comment">// else must async load it.</span>
00205                 <span class="keywordflow">else</span>
00206                 {
00207                         <span class="comment">// start to load a small DDS version if possible</span>
00208                         text-&gt;Texture-&gt;setMipMapSkipAtLoad(_BaseLodLevel);
00209                         <span class="comment">// load it async.</span>
00210                         CAsyncFileManager3D::getInstance().loadTexture(text-&gt;Texture, &amp;text-&gt;Loaded, position);
00211                 }
00212                 <span class="comment">// Add to a list so we can check each frame if it has ended.</span>
00213                 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.push_back(i);
00214         }
00215 
00216         <span class="comment">// get the id of the text entry.</span>
00217         ret= it-&gt;second;
00218 
00219         <span class="comment">// add this instance to the list of ones which use this texture.</span>
00220         CTextureEntry   *text= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[ret];
00221         text-&gt;Instances.push_back(instance);
00222 
00223         <span class="comment">// if the texture is not yet ready, must increment the instance refCount.</span>
00224         <span class="keywordflow">if</span>(!text-&gt;UpLoaded)
00225                 instance-&gt;_AsyncTextureToLoadRefCount++;
00226 
00227         <span class="keywordflow">return</span> ret;
00228 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerd0" doxytag="NL3D::CAsyncTextureManager::deleteTexture" ></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::CAsyncTextureManager::deleteTexture </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>id</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05463.html#l00232">232</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00232">_CurrentTextureLodLoaded</a>, <a class="el" href="a05464.html#l00227">_CurrentUploadTexture</a>, <a class="el" href="a05464.html#l00222">_FreeTextureIds</a>, <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05464.html#l00223">_TextureEntryMap</a>, <a class="el" href="a05464.html#l00217">_TotalTextureSizeAsked</a>, <a class="el" href="a05464.html#l00224">_WaitingTextures</a>, <a class="el" href="a05464.html#l00200">NL3D::CAsyncTextureManager::CTextureEntry::HDLod</a>, <a class="el" href="a05464.html#l00191">NL3D::CAsyncTextureManager::CTextureEntry::Instances</a>, <a class="el" href="a05464.html#l00176">NL3D::CAsyncTextureManager::CTextureEntry::ItMap</a>, <a class="el" href="a05464.html#l00153">NL3D::CAsyncTextureManager::CTextureLod::Loaded</a>, <a class="el" href="a05464.html#l00178">NL3D::CAsyncTextureManager::CTextureEntry::Loaded</a>, <a class="el" href="a05464.html#l00130">NL3D::CAsyncTextureManager::CTextureBase::Texture</a>, <a class="el" href="a05464.html#l00197">NL3D::CAsyncTextureManager::CTextureEntry::TotalTextureSizeAsked</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05464.html#l00180">NL3D::CAsyncTextureManager::CTextureEntry::UpLoaded</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00302">releaseTexture()</a>, and <a class="el" href="a05463.html#l00089">~CAsyncTextureManager()</a>.
<p>
<div class="fragment"><pre>00233 {
00234         CTextureEntry   *text= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[<span class="keywordtype">id</span>];
00235 
00236 
00237         <span class="comment">// **** Stop AsyncLoading/UpLoading of main texture.</span>
00238 
00239         <span class="comment">// stop async loading if not ended</span>
00240         <span class="keywordflow">if</span>(!text-&gt;Loaded)
00241         {
00242                 CAsyncFileManager3D::getInstance().cancelLoadTexture(text-&gt;Texture);
00243         }
00244 
00245         <span class="comment">// remove map entry</span>
00246         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">_TextureEntryMap</a>.erase(text-&gt;ItMap);
00247 
00248         <span class="comment">// remove in list of waiting textures</span>
00249         vector&lt;uint&gt;::iterator  itWait= find(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.begin(),<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.end(), <span class="keywordtype">id</span>);
00250         <span class="keywordflow">if</span>(itWait!=<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.end())
00251                 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.erase(itWait);
00252 
00253         <span class="comment">// If it was the currently uploaded one, abort</span>
00254         <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>==text)
00255         {
00256                 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= NULL;
00257         }
00258 
00259         <span class="comment">// If not uploaded.</span>
00260         <span class="keywordflow">if</span>(!text-&gt;UpLoaded)
00261         {
00262                 <span class="comment">// For all its remainding instances, dec refcount</span>
00263                 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i&lt;text-&gt;Instances.size();i++)
00264                 {
00265                         text-&gt;Instances[i]-&gt;_AsyncTextureToLoadRefCount--;
00266                 }
00267         }
00268 
00269         <span class="comment">// remove from bench</span>
00270         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr13">_TotalTextureSizeAsked</a>-= text-&gt;TotalTextureSizeAsked;
00271 
00272 
00273         <span class="comment">// **** Stop AsyncLoading/UpLoading of HDLod 's texture.</span>
00274 
00275         <span class="comment">// Check if must stop TextureLod loading/uploading.</span>
00276         CTextureLod             *textLod= &amp;text-&gt;HDLod;
00277         <span class="keywordflow">if</span>(textLod==<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>)
00278         {
00279                 <span class="comment">// stop the async loading if not ended.</span>
00280                 <span class="keywordflow">if</span>(!textLod-&gt;Loaded)
00281                 {
00282                         CAsyncFileManager3D::getInstance().cancelLoadTexture(textLod-&gt;Texture);
00283                 }
00284                 <span class="comment">// stop uploading if was me</span>
00285                 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>==textLod)
00286                 {
00287                         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= NULL;
00288                 }
00289                 <span class="comment">// stop loading me.</span>
00290                 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>= NULL;
00291         }
00292 
00293         <span class="comment">// At last delete texture entry.</span>
00294         <span class="keyword">delete</span> text;
00295         _TextureEntries[<span class="keywordtype">id</span>]= NULL;
00296         <span class="comment">// add a new free id.</span>
00297         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">_FreeTextureIds</a>.push_back(<span class="keywordtype">id</span>);
00298 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagera2" doxytag="NL3D::CAsyncTextureManager::getCoarseBitmap" ></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="a02268.html">NLMISC::CBitmap</a> * NL3D::CAsyncTextureManager::getCoarseBitmap </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>id</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
get the RAM LowDef version of a texture. Used For CLodCharacters return NULL if bad Id or if the texture is still not loaded. The bitmap returned has no mipmaps and should be in DXTC1 (not guaranteed).
<p>
Definition at line <a class="el" href="a05463.html#l00343">343</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05464.html#l00203">NL3D::CAsyncTextureManager::CTextureEntry::CoarseBitmap</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05464.html#l00180">NL3D::CAsyncTextureManager::CTextureEntry::UpLoaded</a>.
<p>
Referenced by <a class="el" href="a06393.html#l00866">NL3D::CSkeletonModel::computeLodTexture()</a>.
<p>
<div class="fragment"><pre>00344 {
00345         <span class="keywordflow">if</span>(<span class="keywordtype">id</span>&gt;=<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size())
00346                 <span class="keywordflow">return</span> NULL;
00347         CTextureEntry   *textEntry= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[<span class="keywordtype">id</span>];
00348         <span class="keywordflow">if</span>(!textEntry)
00349                 <span class="keywordflow">return</span> NULL;
00350 
00351         <span class="comment">// if the textEntry not uploaded, return NULL</span>
00352         <span class="keywordflow">if</span>(!textEntry-&gt;UpLoaded)
00353                 <span class="keywordflow">return</span> NULL;
00354 
00355         <span class="comment">// ok return the CoarseBitmap</span>
00356         <span class="keywordflow">return</span> &amp;textEntry-&gt;CoarseBitmap;
00357 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagera3" doxytag="NL3D::CAsyncTextureManager::getLastTextureSizeGot" ></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#a15">uint</a> NL3D::CAsyncTextureManager::getLastTextureSizeGot </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
get what the system really allows 
<p>

<p>
Definition at line <a class="el" href="a05464.html#l00115">115</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
References <a class="el" href="a05464.html#l00218">_LastTextureSizeGot</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05657.html#l01375">NL3D::CDriverUser::getLastAsyncTextureSizeGot()</a>.
<p>
<div class="fragment"><pre>00115 {<span class="keywordflow">return</span> <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr6">_LastTextureSizeGot</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerd1" doxytag="NL3D::CAsyncTextureManager::getNextTextureToUpLoad" ></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::CAsyncTextureManager::getNextTextureToUpLoad </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>nTotalColored</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pDriver</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05463.html#l00553">553</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00232">_CurrentTextureLodLoaded</a>, <a class="el" href="a05464.html#l00227">_CurrentUploadTexture</a>, <a class="el" href="a05464.html#l00229">_CurrentUploadTextureLine</a>, <a class="el" href="a05464.html#l00228">_CurrentUploadTextureMipMap</a>, <a class="el" href="a05464.html#l00215">_MaxHLSColoringPerFrame</a>, <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05464.html#l00224">_WaitingTextures</a>, <a class="el" href="a05464.html#l00184">NL3D::CAsyncTextureManager::CTextureEntry::BuildFromHLSManager</a>, <a class="el" href="a05794.html#l00101">NL3D::CHLSTextureManager::buildTexture()</a>, <a class="el" href="a05464.html#l00057">HLSManager</a>, <a class="el" href="a05464.html#l00186">NL3D::CAsyncTextureManager::CTextureEntry::HLSManagerTextId</a>, <a class="el" href="a05464.html#l00153">NL3D::CAsyncTextureManager::CTextureLod::Loaded</a>, <a class="el" href="a05464.html#l00178">NL3D::CAsyncTextureManager::CTextureEntry::Loaded</a>, <a class="el" href="a05622.html#l00355">nlverify</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a05464.html#l00130">NL3D::CAsyncTextureManager::CTextureBase::Texture</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05463.html#l00629">updateTextureLodSystem()</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00361">update()</a>.
<p>
<div class="fragment"><pre>00554 {
00555         <span class="comment">// Reset texture uploading</span>
00556         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= NULL;
00557         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">_CurrentUploadTextureMipMap</a>= 0;
00558         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr3">_CurrentUploadTextureLine</a>= 0;
00559 
00560         <span class="comment">// Search in WaitingTextures if one has ended async loading</span>
00561         vector&lt;uint&gt;::iterator  it;
00562         <span class="keywordflow">for</span>(it=<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.begin();it!=<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.end();it++)
00563         {
00564                 CTextureEntry   *text= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[*it];
00565                 <span class="comment">// If Async loading done.</span>
00566                 <span class="keywordflow">if</span>(text-&gt;Loaded)
00567                 {
00568                         <span class="comment">// Is it a "texture to color" with HLSManager? yes=&gt; color it now.</span>
00569                         <span class="keywordflow">if</span>(text-&gt;BuildFromHLSManager)
00570                         {
00571                                 <span class="comment">// If not beyond the max coloring texture</span>
00572                                 <span class="keywordflow">if</span>(nTotalColored&lt;<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr7">_MaxHLSColoringPerFrame</a>)
00573                                 {
00574                                         <span class="comment">// Build the texture directly in the TextureFile.</span>
00575                                         <a class="code" href="a04199.html#a9">nlverify</a>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagero0">HLSManager</a>.buildTexture(text-&gt;HLSManagerTextId, *text-&gt;Texture));
00576                                         <span class="comment">// Must validate the textureFile generation. NB: little weird since this is not really a textureFile.</span>
00577                                         <span class="comment">// But it is the easier way to do it.</span>
00578                                         text-&gt;Texture-&gt;validateGenerateFlag();
00579                                         <span class="comment">// compute the texture size (approx). NB: DXTC5 means 1 pixel==1 byte.</span>
00580                                         <a class="code" href="a04558.html#a15">uint</a>    <a class="code" href="a04223.html#a587">size</a>= (<a class="code" href="a04558.html#a15">uint</a>)(text-&gt;Texture-&gt;getSize(0)*1.33);
00581                                         <span class="comment">// Add it to the num of colorised texture done in current update().</span>
00582                                         nTotalColored+= <a class="code" href="a04223.html#a587">size</a>;
00583                                 }
00584                                 <span class="comment">// Else must quit and don't update any more texture this frame (_CurrentUploadTexture==NULL)</span>
00585                                 <span class="keywordflow">else</span>
00586                                         <span class="keywordflow">return</span>;
00587                         }
00588 
00589                         <span class="comment">// upload this one</span>
00590                         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= text;
00591                         <span class="comment">// remove it from list of waiting textures</span>
00592                         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.erase(it);
00593                         <span class="comment">// found =&gt; end.</span>
00594                         <span class="keywordflow">return</span>;
00595                 }
00596         }
00597 
00598         <span class="comment">// If here, and if no more waiting textures, update the Lod system.</span>
00599         <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">_WaitingTextures</a>.empty())
00600         {
00601                 <span class="comment">// if end to load the current lod.</span>
00602                 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a> &amp;&amp; <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>-&gt;<a class="code" href="a02233.html#NL3D_1_1CAsyncTextureManager_1_1CTextureLodo2">Loaded</a>)
00603                 {
00604                         <span class="comment">// upload this one</span>
00605                         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>;
00606                         <span class="keywordflow">return</span>;
00607                 }
00608 
00609                 <span class="comment">// if no Lod texture currently loading, try to load/unload one</span>
00610                 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a> == NULL)
00611                 {
00612                         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerd2">updateTextureLodSystem</a>(pDriver);
00613                 }
00614         }
00615 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagera4" doxytag="NL3D::CAsyncTextureManager::getTotalTextureSizeAsked" ></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#a15">uint</a> NL3D::CAsyncTextureManager::getTotalTextureSizeAsked </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
get the async texture Size asked (ie maybe bigger than MaxTotalTextureSize). 
<p>

<p>
Definition at line <a class="el" href="a05464.html#l00113">113</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
References <a class="el" href="a05464.html#l00217">_TotalTextureSizeAsked</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05657.html#l01367">NL3D::CDriverUser::getTotalAsyncTextureSizeAsked()</a>.
<p>
<div class="fragment"><pre>00113 {<span class="keywordflow">return</span> <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr13">_TotalTextureSizeAsked</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagera5" doxytag="NL3D::CAsyncTextureManager::isTextureUpLoaded" ></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::CAsyncTextureManager::isTextureUpLoaded </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>id</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
tells if a texture is loaded in the driver (ie ready to use) 
<p>

<p>
Definition at line <a class="el" href="a05463.html#l00334">334</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00335 {
00336         <a class="code" href="a04199.html#a6">nlassert</a>(<span class="keywordtype">id</span>&lt;<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size());
00337         <a class="code" href="a04199.html#a6">nlassert</a>(_TextureEntries[<span class="keywordtype">id</span>]);
00338         <span class="keywordflow">return</span> <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[<span class="keywordtype">id</span>]-&gt;UpLoaded;
00339 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagera6" doxytag="NL3D::CAsyncTextureManager::releaseTexture" ></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::CAsyncTextureManager::releaseTexture </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>id</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02873.html">CMeshBaseInstance</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>instance</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
release a texture-instance tuple. the texture is released if no more instance use it. 
<p>

<p>
Definition at line <a class="el" href="a05463.html#l00302">302</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05464.html#l00191">NL3D::CAsyncTextureManager::CTextureEntry::Instances</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05464.html#l00180">NL3D::CAsyncTextureManager::CTextureEntry::UpLoaded</a>.
<p>
Referenced by <a class="el" href="a05993.html#l00486">NL3D::CMeshBaseInstance::releaseCurrentAsyncTextures()</a>.
<p>
<div class="fragment"><pre>00303 {
00304         <a class="code" href="a04199.html#a6">nlassert</a>(<span class="keywordtype">id</span>&lt;<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size());
00305         <a class="code" href="a04199.html#a6">nlassert</a>(_TextureEntries[<span class="keywordtype">id</span>]);
00306 
00307         <span class="comment">// find an instance in this texture an remove it.</span>
00308         CTextureEntry   *text= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[<span class="keywordtype">id</span>];
00309         <a class="code" href="a04558.html#a15">uint</a>                    instSize= text-&gt;Instances.size();
00310         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0;i&lt;instSize;i++)
00311         {
00312                 <span class="keywordflow">if</span>(text-&gt;Instances[i]== instance)
00313                 {
00314                         <span class="comment">// Must first release the refCount if the texture is not uploaded</span>
00315                         <span class="keywordflow">if</span>(!text-&gt;UpLoaded)
00316                                 text-&gt;Instances[i]-&gt;_AsyncTextureToLoadRefCount--;
00317                         <span class="comment">// remove it by swapping with last texture</span>
00318                         text-&gt;Instances[i]= text-&gt;Instances[instSize-1];
00319                         text-&gt;Instances.pop_back();
00320                         <span class="comment">// must stop: remove only the first occurence of instance.</span>
00321                         <span class="keywordflow">break</span>;
00322                 }
00323         }
00324 
00325         <span class="comment">// if no more instance occurence, the texture is no more used =&gt; release it.</span>
00326         <span class="keywordflow">if</span>(text-&gt;Instances.empty())
00327         {
00328                 <span class="comment">// do all the good stuff</span>
00329                 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerd0">deleteTexture</a>(<span class="keywordtype">id</span>);
00330         }
00331 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagera7" doxytag="NL3D::CAsyncTextureManager::setupLod" ></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::CAsyncTextureManager::setupLod </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>baseLevel</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>&nbsp;</td>
          <td class="mdname" nowrap> <em>maxLevel</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
setup the mipMap levels.  When the texture is first added, it is loaded skipping the baseLevel first mipmap  During time, furhter mipmap are loaded, according to instance position etc... maxLevel tells where to stop. If 0, the texture will finally be entirely uploaded. Default is 3,1.
<p>
Definition at line <a class="el" href="a05463.html#l00121">121</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00213">_BaseLodLevel</a>, <a class="el" href="a05464.html#l00213">_MaxLodLevel</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05657.html#l01333">NL3D::CDriverUser::setupAsyncTextureLod()</a>.
<p>
<div class="fragment"><pre>00122 {
00123         <a class="code" href="a04199.html#a6">nlassert</a>(baseLevel&gt;=maxLevel);
00124         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr0">_BaseLodLevel</a>= baseLevel;
00125         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr8">_MaxLodLevel</a>= maxLevel;
00126 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagera8" doxytag="NL3D::CAsyncTextureManager::setupMaxHLSColoringPerFrame" ></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::CAsyncTextureManager::setupMaxHLSColoringPerFrame </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>maxCol</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Setup max texture HLS Coloring per <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera11">update()</a> call (in bytes). Default to 20K. 
<p>

<p>
Definition at line <a class="el" href="a05463.html#l00137">137</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00215">_MaxHLSColoringPerFrame</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05657.html#l01384">NL3D::CDriverUser::setupMaxHLSColoringPerFrame()</a>.
<p>
<div class="fragment"><pre>00138 {
00139         <span class="keywordflow">if</span>(maxCol&gt;0)
00140                 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr7">_MaxHLSColoringPerFrame</a>= maxCol;
00141 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagera9" doxytag="NL3D::CAsyncTextureManager::setupMaxTotalTextureSize" ></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::CAsyncTextureManager::setupMaxTotalTextureSize </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>maxText</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Setup max total texture size allowed. Default is 10Mo. 
<p>

<p>
Definition at line <a class="el" href="a05463.html#l00144">144</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00216">_MaxTotalTextureSize</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05657.html#l01359">NL3D::CDriverUser::setupMaxTotalAsyncTextureSize()</a>.
<p>
<div class="fragment"><pre>00145 {
00146         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr9">_MaxTotalTextureSize</a>= maxText;
00147 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagera10" doxytag="NL3D::CAsyncTextureManager::setupMaxUploadPerFrame" ></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::CAsyncTextureManager::setupMaxUploadPerFrame </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>maxup</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Setup max texture upload in driver per <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagera11">update()</a> call (in bytes). Default to 64K. 
<p>

<p>
Definition at line <a class="el" href="a05463.html#l00130">130</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00214">_MaxUploadPerFrame</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05657.html#l01341">NL3D::CDriverUser::setupAsyncTextureMaxUploadPerFrame()</a>.
<p>
<div class="fragment"><pre>00131 {
00132         <span class="keywordflow">if</span>(maxup&gt;0)
00133                 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">_MaxUploadPerFrame</a>= maxup;
00134 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagera11" doxytag="NL3D::CAsyncTextureManager::update" ></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::CAsyncTextureManager::update </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pDriver</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
update the manager. New loaded texture are uploaded. Instances are updated to know if all their pending textures have been uploaded.
<p>
Definition at line <a class="el" href="a05463.html#l00361">361</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00213">_BaseLodLevel</a>, <a class="el" href="a05464.html#l00232">_CurrentTextureLodLoaded</a>, <a class="el" href="a05464.html#l00227">_CurrentUploadTexture</a>, <a class="el" href="a05464.html#l00213">_MaxLodLevel</a>, <a class="el" href="a05464.html#l00217">_TotalTextureSizeAsked</a>, <a class="el" href="a05464.html#l00189">NL3D::CAsyncTextureManager::CTextureEntry::BaseSize</a>, <a class="el" href="a05464.html#l00182">NL3D::CAsyncTextureManager::CTextureEntry::CanHaveLOD</a>, <a class="el" href="a05463.html#l00059">NL3D::CAsyncTextureManager::CTextureEntry::createCoarseBitmap()</a>, <a class="el" href="a05464.html#l00157">NL3D::CAsyncTextureManager::CTextureLod::ExtraSize</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, <a class="el" href="a05487.html#l00335">NLMISC::CBitmap::getPixelFormat()</a>, <a class="el" href="a05486.html#l01412">NLMISC::CBitmap::getSize()</a>, <a class="el" href="a05464.html#l00200">NL3D::CAsyncTextureManager::CTextureEntry::HDLod</a>, <a class="el" href="a05464.html#l00191">NL3D::CAsyncTextureManager::CTextureEntry::Instances</a>, <a class="el" href="a05464.html#l00132">NL3D::CAsyncTextureManager::CTextureBase::isTextureEntry()</a>, <a class="el" href="a05464.html#l00151">NL3D::CAsyncTextureManager::CTextureLod::Level</a>, <a class="el" href="a05464.html#l00153">NL3D::CAsyncTextureManager::CTextureLod::Loaded</a>, <a class="el" href="a06506.html#l00327">NL3D::ITexture::release()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera80">NL3D::IDriver::swapTextureHandle()</a>, <a class="el" href="a05464.html#l00130">NL3D::CAsyncTextureManager::CTextureBase::Texture</a>, <a class="el" href="a05464.html#l00147">NL3D::CAsyncTextureManager::CTextureLod::TextureEntry</a>, <a class="el" href="a05464.html#l00197">NL3D::CAsyncTextureManager::CTextureEntry::TotalTextureSizeAsked</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05464.html#l00155">NL3D::CAsyncTextureManager::CTextureLod::UpLoaded</a>, <a class="el" href="a05464.html#l00180">NL3D::CAsyncTextureManager::CTextureEntry::UpLoaded</a>, <a class="el" href="a05463.html#l00451">uploadTexturePart()</a>, and <a class="el" href="a05463.html#l00619">validDXTCMipMap()</a>.
<p>
Referenced by <a class="el" href="a05657.html#l01349">NL3D::CDriverUser::updateAsyncTexture()</a>.
<p>
<div class="fragment"><pre>00362 {
00363         <a class="code" href="a04558.html#a15">uint</a>    nTotalUploaded = 0;
00364         <a class="code" href="a04558.html#a15">uint</a>    nTotalColored = 0;
00365 
00366         <span class="comment">// if no texture to upload, get the next one</span>
00367         <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>==NULL)
00368                 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerd1">getNextTextureToUpLoad</a>(nTotalColored, pDriver);
00369 
00370         <span class="comment">// while some texture to upload</span>
00371         <span class="keywordflow">while</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>)
00372         {
00373                 ITexture        *pText= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>-&gt;<a class="code" href="a02231.html#NL3D_1_1CAsyncTextureManager_1_1CTextureLodo3">Texture</a>;
00374                 <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerd3">uploadTexturePart</a>(pText, pDriver, nTotalUploaded))
00375                 {
00376                         <span class="comment">// Stuff for TextureEntry</span>
00377                         <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>-&gt;<a class="code" href="a02231.html#NL3D_1_1CAsyncTextureManager_1_1CTextureLoda1">isTextureEntry</a>())
00378                         {
00379                                 <a class="code" href="a04558.html#a15">uint</a>    i;
00380                                 CTextureEntry   *textEntry= static_cast&lt;CTextureEntry*&gt;(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>);
00381                                 <span class="comment">// If we are here, the texture is finally entirely uploaded. Compile it!</span>
00382                                 textEntry-&gt;UpLoaded= <span class="keyword">true</span>;
00383                                 <span class="comment">// Can Have lod if texture is DXTC and have mipMaps! Also disalbe if system disable it</span>
00384                                 textEntry-&gt;CanHaveLOD= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerh0">validDXTCMipMap</a>(pText) &amp;&amp; <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr0">_BaseLodLevel</a>&gt;<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr8">_MaxLodLevel</a>;
00385                                 <span class="comment">// compute the size it takes in VRAM</span>
00386                                 <a class="code" href="a04558.html#a15">uint</a>    baseMipMapSize= pText-&gt;getSize(0)*CBitmap::bitPerPixels[pText-&gt;getPixelFormat()]/8;
00387                                 <span class="comment">// full size with mipmap</span>
00388                                 textEntry-&gt;BaseSize= (<a class="code" href="a04558.html#a15">uint</a>)(baseMipMapSize*1.33f);
00389                                 <span class="comment">// UpLoaded !! =&gt; signal all instances.</span>
00390                                 <span class="keywordflow">for</span>(i=0;i&lt;textEntry-&gt;Instances.size();i++)
00391                                 {
00392                                         textEntry-&gt;Instances[i]-&gt;_AsyncTextureToLoadRefCount--;
00393                                 }
00394 
00395                                 <span class="comment">// Create the coarse bitmap with the text (NB: still in memory here)</span>
00396                                 textEntry-&gt;createCoarseBitmap();
00397 
00398                                 <span class="comment">// If CanHaveLOD, create now the lods entries.</span>
00399                                 <span class="keywordflow">if</span>(textEntry-&gt;CanHaveLOD)
00400                                 {
00401                                         <span class="comment">/* Allow only the MaxLod to be loaded async</span>
00402 <span class="comment">                                                This is supposed to be faster since a fseek is much longer than a texture Read.</span>
00403 <span class="comment">                                                Then it is more intelligent to read only One texture (the High Def), than to try to</span>
00404 <span class="comment">                                                read intermediate ones (512, 256, 128) because this made 3 more fseek.</span>
00405 <span class="comment">                                        */</span>
00406                                         <span class="comment">// create only the MaxLod possible entry</span>
00407                                         CTextureLod             &amp;textLod= textEntry-&gt;HDLod;
00408                                         <span class="comment">// fill textLod</span>
00409                                         textLod.TextureEntry= textEntry;
00410                                         textLod.Level= _MaxLodLevel;
00411                                         <span class="comment">// extra size of the lod only (important for LoadBalacing in updateTextureLodSystem())</span>
00412                                         textLod.ExtraSize= textEntry-&gt;BaseSize*(1&lt;&lt;(2*(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr0">_BaseLodLevel</a>-_MaxLodLevel))) - textEntry-&gt;BaseSize;
00413                                         <span class="comment">// not yet loaded/upLoaded</span>
00414                                         textLod.Loaded= <span class="keyword">false</span>;
00415                                         textLod.UpLoaded= <span class="keyword">false</span>;
00416                                 }
00417 
00418                                 <span class="comment">// compute texture size for bench</span>
00419                                 textEntry-&gt;TotalTextureSizeAsked= textEntry-&gt;BaseSize + textEntry-&gt;HDLod.ExtraSize;
00420 
00421                                 <span class="comment">// Add texture size to global texture size</span>
00422                                 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr13">_TotalTextureSizeAsked</a>+= textEntry-&gt;TotalTextureSizeAsked;
00423                         }
00424                         <span class="comment">// else, stuff for textureLod.</span>
00425                         <span class="keywordflow">else</span>
00426                         {
00427                                 CTextureLod             *textLod= static_cast&lt;CTextureLod*&gt;(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>);
00428                                 <span class="comment">// Swap the uploaded Driver Handle with the Main texture.</span>
00429                                 pDriver-&gt;swapTextureHandle(*textLod-&gt;Texture, *textLod-&gt;TextureEntry-&gt;Texture);
00430                                 <span class="comment">// Flag the Lod.</span>
00431                                 textLod-&gt;UpLoaded= <span class="keyword">true</span>;
00432                                 <span class="comment">// Ok, ended to completly load this textureLod.</span>
00433                                 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>= NULL;
00434                         }
00435 
00436                         <span class="comment">// finally uploaded in VRAM, can release the RAM texture memory</span>
00437                         pText-&gt;release();
00438 
00439                         <span class="comment">// if not break because can't upload all parts, get next texture to upload</span>
00440                         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">_CurrentUploadTexture</a>= NULL;
00441                         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerd1">getNextTextureToUpLoad</a>(nTotalColored, pDriver);
00442                 }
00443                 <span class="keywordflow">else</span>
00444                         <span class="comment">// Fail to upload all, abort.</span>
00445                         <span class="keywordflow">return</span>;
00446         }
00447 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerd2" doxytag="NL3D::CAsyncTextureManager::updateTextureLodSystem" ></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::CAsyncTextureManager::updateTextureLodSystem </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pDriver</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05463.html#l00629">629</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00232">_CurrentTextureLodLoaded</a>, <a class="el" href="a05464.html#l00218">_LastTextureSizeGot</a>, <a class="el" href="a05464.html#l00216">_MaxTotalTextureSize</a>, <a class="el" href="a05464.html#l00221">_TextureEntries</a>, <a class="el" href="a05464.html#l00189">NL3D::CAsyncTextureManager::CTextureEntry::BaseSize</a>, <a class="el" href="a05464.html#l00182">NL3D::CAsyncTextureManager::CTextureEntry::CanHaveLOD</a>, <a class="el" href="a05464.html#l00200">NL3D::CAsyncTextureManager::CTextureEntry::HDLod</a>, <a class="el" href="a05464.html#l00191">NL3D::CAsyncTextureManager::CTextureEntry::Instances</a>, <a class="el" href="a05464.html#l00151">NL3D::CAsyncTextureManager::CTextureLod::Level</a>, <a class="el" href="a05464.html#l00153">NL3D::CAsyncTextureManager::CTextureLod::Loaded</a>, <a class="el" href="a05464.html#l00163">NL3D::CAsyncTextureManager::CTextureLodToSort::Lod</a>, <a class="el" href="a05464.html#l00193">NL3D::CAsyncTextureManager::CTextureEntry::MinDistance</a>, <a class="el" href="a05464.html#l00195">NL3D::CAsyncTextureManager::CTextureEntry::MinPosition</a>, <a class="el" href="a05463.html#l00041">NL3D_ATM_MIN_DISTANCE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05464.html#l00164">NL3D::CAsyncTextureManager::CTextureLodToSort::Position</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera80">NL3D::IDriver::swapTextureHandle()</a>, <a class="el" href="a05464.html#l00130">NL3D::CAsyncTextureManager::CTextureBase::Texture</a>, <a class="el" href="a05464.html#l00147">NL3D::CAsyncTextureManager::CTextureLod::TextureEntry</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05464.html#l00155">NL3D::CAsyncTextureManager::CTextureLod::UpLoaded</a>, and <a class="el" href="a05464.html#l00149">NL3D::CAsyncTextureManager::CTextureLod::Weight</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>.
<p>
<div class="fragment"><pre>00630 {
00631         <a class="code" href="a04558.html#a14">sint</a>    i;
00632 
00633         <span class="comment">// the array to sort</span>
00634         <span class="keyword">static</span>  vector&lt;CTextureLodToSort&gt;       lodArray;
00635         lodArray.clear();
00636         <a class="code" href="a04558.html#a15">uint</a>    reserveSize= 0;
00637 
00638         <span class="comment">// for each texture entry compute min distance of use</span>
00639         <span class="comment">//=============</span>
00640         <a class="code" href="a04558.html#a15">uint</a>    currentBaseSize= 0;
00641         <span class="keywordflow">for</span>(i=0;i&lt;(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size();i++)
00642         {
00643                 <span class="keywordflow">if</span>(!<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[i])
00644                         <span class="keywordflow">continue</span>;
00645                 CTextureEntry   &amp;text= *<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[i];
00646                 <span class="comment">// do it only for Lodable textures</span>
00647                 <span class="keywordflow">if</span>(text.CanHaveLOD)
00648                 {
00649                         text.MinDistance= FLT_MAX;
00650                         <span class="comment">// for all instances.</span>
00651                         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> j=0;j&lt;text.Instances.size();j++)
00652                         {
00653                                 <span class="keywordtype">float</span>   instDist= text.Instances[j]-&gt;getAsyncTextureDistance();
00654                                 
00655                                 <span class="keywordflow">if</span> (instDist&lt;text.MinDistance)
00656                                 {
00657                                         text.MinPosition = text.Instances[j]-&gt;getPos();
00658                                         text.MinDistance = instDist;
00659                                 }
00660                         }
00661 
00662                         <span class="comment">// avoid /0</span>
00663                         text.MinDistance= max(NL3D_ATM_MIN_DISTANCE, text.MinDistance);
00664 
00665                         <span class="comment">// how many textLods to add</span>
00666                         reserveSize++;
00667 
00668                         <span class="comment">// the minimum mem size the system take with base lod.</span>
00669                         currentBaseSize+= text.BaseSize;
00670                 }
00671         }
00672         <span class="comment">// reserve space</span>
00673         lodArray.reserve(reserveSize);
00674 
00675 
00676         <span class="comment">// for each texture lod compute weight, and append</span>
00677         <span class="comment">//=============</span>
00678         <span class="keywordflow">for</span>(i=0;i&lt;(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>.size();i++)
00679         {
00680                 <span class="keywordflow">if</span>(!<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[i])
00681                         <span class="keywordflow">continue</span>;
00682                 CTextureEntry   &amp;text= *<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">_TextureEntries</a>[i];
00683                 <span class="comment">// do it only for Lodable textures</span>
00684                 <span class="keywordflow">if</span>(text.CanHaveLOD)
00685                 {
00686                         <span class="comment">// This Weight is actually a screen Pixel Ratio! (divide by distance)</span>
00687                         CTextureLod     *textLod= &amp;text.HDLod;
00688                         textLod-&gt;Weight= (1&lt;&lt;textLod-&gt;Level) / text.MinDistance;
00689                         <span class="comment">// add to array</span>
00690                         CTextureLodToSort toSort;
00691                         toSort.Lod = textLod;
00692                         toSort.Position = text.MinPosition;
00693                         lodArray.push_back(toSort);
00694                 }
00695         }
00696 
00697 
00698         <span class="comment">// sort</span>
00699         <span class="comment">//=============</span>
00700         sort(lodArray.begin(), lodArray.end());
00701 
00702 
00703         <span class="comment">// Compute lod to load/unload</span>
00704         <span class="comment">//=============</span>
00705         <span class="comment">// Compute Pivot, ie what lods have to be loaded, and what lods do not</span>
00706         <a class="code" href="a04558.html#a15">uint</a>    pivot= 0;
00707         <a class="code" href="a04558.html#a15">uint</a>    currentWantedSize= currentBaseSize;
00708         <a class="code" href="a04558.html#a15">uint</a>    currentLoadedSize= currentBaseSize;
00709         <span class="keywordflow">for</span>(i=lodArray.size()-1;i&gt;=0;i--)
00710         {
00711                 <a class="code" href="a04558.html#a15">uint</a>    lodSize= lodArray[i].Lod-&gt;ExtraSize;
00712                 currentWantedSize+= lodSize;
00713                 <span class="keywordflow">if</span>(lodArray[i].Lod-&gt;UpLoaded)
00714                         currentLoadedSize+= lodSize;
00715                 <span class="comment">// if &gt; max allowed, stop the pivot here. NB: the pivot is included in the "must load them" part.</span>
00716                 <span class="keywordflow">if</span>(currentWantedSize &gt; <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr9">_MaxTotalTextureSize</a>)
00717                 {
00718                         pivot= i;
00719                         <span class="keywordflow">break</span>;
00720                 }
00721         }
00722         <span class="comment">// continue to count currentLoadedSize</span>
00723         <span class="keywordflow">for</span>(;i&gt;=0;i--)
00724         {
00725                 <span class="keywordflow">if</span>(lodArray[i].Lod-&gt;UpLoaded)
00726                         currentLoadedSize+= lodArray[i].Lod-&gt;ExtraSize;
00727         }
00728         <span class="comment">// save bench.</span>
00729         <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr6">_LastTextureSizeGot</a>= currentLoadedSize;
00730 
00731 
00732         <span class="comment">// if the loadedSize is inferior to the wanted size, we can load a new LOD</span>
00733         CTextureLodToSort       *textLod= NULL;
00734         <span class="keywordtype">bool</span>                    unload;
00735         <span class="keywordflow">if</span>(currentLoadedSize&lt;currentWantedSize)
00736         {
00737                 unload= <span class="keyword">false</span>;
00738                 <span class="comment">// search from end of the list to pivot (included), the first LOD (ie the most important) to load.</span>
00739                 <span class="keywordflow">for</span>(i=lodArray.size()-1;i&gt;=(<a class="code" href="a04558.html#a14">sint</a>)pivot;i--)
00740                 {
00741                         <span class="keywordflow">if</span>(!lodArray[i].Lod-&gt;UpLoaded)
00742                         {
00743                                 textLod= &amp;(lodArray[i]);
00744                                 <span class="keywordflow">break</span>;
00745                         }
00746                 }
00747                 <span class="comment">// One must have been found, since currentLoadedSize&lt;currentWantedSize</span>
00748                 <a class="code" href="a04199.html#a6">nlassert</a>(textLod);
00749         }
00750         <span class="keywordflow">else</span>
00751         {
00752                 unload= <span class="keyword">true</span>;
00753                 <span class="comment">// search from start to pivot (exclued), the first LOD (ie the less important) to unload.</span>
00754                 <span class="keywordflow">for</span>(i=0;i&lt;(<a class="code" href="a04558.html#a14">sint</a>)pivot;i++)
00755                 {
00756                         <span class="keywordflow">if</span>(lodArray[i].Lod-&gt;UpLoaded)
00757                         {
00758                                 textLod= &amp;(lodArray[i]);
00759                                 <span class="keywordflow">break</span>;
00760                         }
00761                 }
00762                 <span class="comment">// it is possible that not found here. It means that All is Ok!!</span>
00763                 <span class="keywordflow">if</span>(textLod==NULL)
00764                         <span class="comment">// no-op.</span>
00765                         <span class="keywordflow">return</span>;
00766         }
00767 
00768 
00769         <span class="comment">// load/unload</span>
00770         <span class="comment">//=============</span>
00771         <span class="keywordflow">if</span>(!unload)
00772         {
00773                 <span class="comment">// create a new TextureFile, with no sharing system.</span>
00774                 <a class="code" href="a04199.html#a6">nlassert</a>(textLod-&gt;Lod-&gt;Texture==NULL);
00775                 textLod-&gt;Lod-&gt;Texture= <span class="keyword">new</span> CTextureFile;
00776                 <span class="comment">// Do not allow degradation.</span>
00777                 textLod-&gt;Lod-&gt;Texture-&gt;setAllowDegradation(<span class="keyword">false</span>);
00778                 textLod-&gt;Lod-&gt;Texture-&gt;enableSharing(<span class="keyword">false</span>);
00779                 textLod-&gt;Lod-&gt;Texture-&gt;setFileName(textLod-&gt;Lod-&gt;TextureEntry-&gt;Texture-&gt;getFileName());
00780                 textLod-&gt;Lod-&gt;Texture-&gt;setMipMapSkipAtLoad(textLod-&gt;Lod-&gt;Level);
00781                 <span class="comment">// setup async loading</span>
00782                 <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">_CurrentTextureLodLoaded</a>= textLod-&gt;Lod;
00783                 <span class="comment">// load it async.</span>
00784                 CAsyncFileManager3D::getInstance().loadTexture(textLod-&gt;Lod-&gt;Texture, &amp;textLod-&gt;Lod-&gt;Loaded, textLod-&gt;Position);
00785         }
00786         <span class="keywordflow">else</span>
00787         {
00788                 <span class="comment">// Swap now the lod.</span>
00789                 <a class="code" href="a04199.html#a6">nlassert</a>(textLod-&gt;Lod-&gt;Texture!=NULL);
00790                 <span class="comment">// Swap the uploaded Driver Handle with the Main texture (ot get the Ugly one)</span>
00791                 pDriver-&gt;swapTextureHandle(*textLod-&gt;Lod-&gt;Texture, *textLod-&gt;Lod-&gt;TextureEntry-&gt;Texture);
00792                 <span class="comment">// Flag the Lod.</span>
00793                 textLod-&gt;Lod-&gt;UpLoaded= <span class="keyword">false</span>;
00794                 textLod-&gt;Lod-&gt;Loaded= <span class="keyword">false</span>;
00795                 <span class="comment">// Release completly the texture in driver. (SmartPtr delete)</span>
00796                 textLod-&gt;Lod-&gt;Texture= NULL;
00797         }
00798 
00799 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerd3" doxytag="NL3D::CAsyncTextureManager::uploadTexturePart" ></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::CAsyncTextureManager::uploadTexturePart </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03487.html">ITexture</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pText</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pDriver</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> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>nTotalUpload</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05463.html#l00451">451</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05464.html#l00229">_CurrentUploadTextureLine</a>, <a class="el" href="a05464.html#l00228">_CurrentUploadTextureMipMap</a>, <a class="el" href="a05464.html#l00214">_MaxUploadPerFrame</a>, <a class="el" href="a05486.html#l01388">NLMISC::CBitmap::getHeight()</a>, <a class="el" href="a05487.html#l00369">NLMISC::CBitmap::getMipMapCount()</a>, <a class="el" href="a05487.html#l00335">NLMISC::CBitmap::getPixelFormat()</a>, <a class="el" href="a06506.html#l00267">NL3D::ITexture::getReleasable()</a>, <a class="el" href="a05486.html#l01412">NLMISC::CBitmap::getSize()</a>, <a class="el" href="a05486.html#l01363">NLMISC::CBitmap::getWidth()</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a06319.html#l00065">NLMISC::CRect::set()</a>, <a class="el" href="a06506.html#l00278">NL3D::ITexture::setReleasable()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera71">NL3D::IDriver::setupTextureEx()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a05981.html#l00096">uint8</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera82">NL3D::IDriver::uploadTexture()</a>, and <a class="el" href="a05463.html#l00619">validDXTCMipMap()</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00361">update()</a>.
<p>
<div class="fragment"><pre>00452 {
00453         <a class="code" href="a04558.html#a15">uint</a>            nMipMap;
00454         nMipMap = pText-&gt;getMipMapCount();
00455 
00456 
00457         <span class="comment">// If this is the start of uploading, setup the texture in driver.</span>
00458         <span class="keywordflow">if</span>(<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">_CurrentUploadTextureMipMap</a>==0 &amp;&amp; <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr3">_CurrentUploadTextureLine</a>==0)
00459         {
00460                 <span class="comment">// If the texture is not a valid DXTC with mipmap</span>
00461                 <span class="keywordflow">if</span>(!<a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerh0">validDXTCMipMap</a>(pText))
00462                 {
00463                         <span class="comment">/* For now, prefer do nothing, because this may be an error (texture not found)</span>
00464 <span class="comment">                                and the texture may not be used at all, so don't take VRAM for nothing.</span>
00465 <span class="comment">                                =&gt; if the texture is used, it will be loaded synchronously by the caller later in the process</span>
00466 <span class="comment">                                =&gt; frame freeze.</span>
00467 <span class="comment">                        */</span>
00468                         <span class="comment">/*</span>
00469 <span class="comment">                        // upload All now.</span>
00470 <span class="comment">                        // MipMap generation and compression may be done here =&gt; Maybe Big Freeze.</span>
00471 <span class="comment">                        // approximate*2 instead of *1.33 for mipmaps.</span>
00472 <span class="comment">                        uint    nWeight = pText-&gt;getSize (0) * 2;</span>
00473 <span class="comment">                        nWeight= (nWeight*CBitmap::bitPerPixels[pText-&gt;getPixelFormat()])/8;</span>
00474 <span class="comment">                        nTotalUploaded+= nWeight;</span>
00475 <span class="comment">                        pDriver-&gt;setupTexture(*pText);</span>
00476 <span class="comment">                        return true;*/</span>
00477                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00478                 }
00479                 <span class="keywordflow">else</span>
00480                 {
00481                         <span class="comment">// Create the texture only and do not upload anything</span>
00482                         <span class="keywordtype">bool</span> isRel = pText-&gt;getReleasable ();
00483                         pText-&gt;setReleasable (<span class="keyword">false</span>);
00484                         <span class="keywordtype">bool</span> isAllUploaded = <span class="keyword">false</span>;
00485                         <span class="comment">/* Even if the shared texture is still referenced and so still exist in driver, we MUST recreate with good size</span>
00486 <span class="comment">                                the texture. This is important for Texture Memory Load Balancing</span>
00487 <span class="comment">                                (this may means that is used elsewhere than in the CAsyncTextureManager)</span>
00488 <span class="comment">                                Hence: bMustRecreateSharedTexture==true</span>
00489 <span class="comment">                        */</span>
00490                         pDriver-&gt;setupTextureEx (*pText, <span class="keyword">false</span>, isAllUploaded, <span class="keyword">true</span>);
00491                         pText-&gt;setReleasable (isRel);
00492                         <span class="comment">// if the texture is already uploaded, abort partial uploading.</span>
00493                         <span class="keywordflow">if</span> (isAllUploaded)
00494                                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
00495                 }
00496         }
00497 
00498 
00499         <span class="comment">// try to upload all mipmap</span>
00500         <span class="keywordflow">for</span>(; <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">_CurrentUploadTextureMipMap</a>&lt;nMipMap; <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">_CurrentUploadTextureMipMap</a>++)
00501         {
00502                 <a class="code" href="a03319.html">CRect</a> zeRect;
00503                 <a class="code" href="a04558.html#a15">uint</a> nMM= <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">_CurrentUploadTextureMipMap</a>;
00504 
00505                 <span class="comment">// What is left to upload ?</span>
00506                 <a class="code" href="a04558.html#a15">uint</a>    nWeight = pText-&gt;getSize (nMM) - _CurrentUploadTextureLine*pText-&gt;getWidth(nMM);
00507                 nWeight= (nWeight*CBitmap::bitPerPixels[pText-&gt;getPixelFormat()])/8;
00508 
00509                 <span class="keywordflow">if</span> ((nTotalUploaded  + nWeight) &gt; <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">_MaxUploadPerFrame</a>)
00510                 {
00511                         <span class="comment">// We cannot upload the whole mipmap -&gt; we have to cut it</span>
00512                         <a class="code" href="a04558.html#a15">uint</a> nSizeToUpload = <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">_MaxUploadPerFrame</a> - nTotalUploaded ;
00513                         <span class="comment">// DXTC =&gt; min block of 4x4 </span>
00514                         <a class="code" href="a04558.html#a15">uint</a> nLineWeight = (max(pText-&gt;getWidth(nMM), (<a class="code" href="a04558.html#a11">uint32</a>)4)*CBitmap::bitPerPixels[pText-&gt;getPixelFormat()])/8;
00515                         <a class="code" href="a04558.html#a15">uint</a> nNbLineToUpload = nSizeToUpload / nLineWeight;
00516                         <span class="comment">// Upload 4 line by 4 line, and upload at leat one 4*line.</span>
00517                         nNbLineToUpload = nNbLineToUpload / 4;
00518                         nNbLineToUpload= max(nNbLineToUpload, 1U);
00519                         nNbLineToUpload *= 4;
00520                         <span class="comment">// comput rect to upload</span>
00521                         <a class="code" href="a04558.html#a11">uint32</a> nNewLine = _CurrentUploadTextureLine + nNbLineToUpload;
00522                         nNewLine= <a class="code" href="a04061.html#a0">min</a>(nNewLine, pText-&gt;getHeight(nMM));
00523                         zeRect.<a class="code" href="a03319.html#NLMISC_1_1CRecta9">set</a> (0, _CurrentUploadTextureLine, pText-&gt;getWidth(nMM), nNewLine);
00524                         _CurrentUploadTextureLine = nNewLine;
00525                         <span class="comment">// if fill all the mipmap, must go to next</span>
00526                         <span class="keywordflow">if</span> (_CurrentUploadTextureLine == pText-&gt;getHeight(nMM))
00527                         {
00528                                 _CurrentUploadTextureLine = 0;
00529                                 _CurrentUploadTextureMipMap++;
00530                         }
00531                 }
00532                 <span class="keywordflow">else</span>
00533                 {
00534                         <span class="comment">// We can upload the whole mipmap (or the whole rest of the mipmap)</span>
00535                         zeRect.<a class="code" href="a03319.html#NLMISC_1_1CRecta9">set</a> (0, _CurrentUploadTextureLine, pText-&gt;getWidth(nMM), pText-&gt;getHeight(nMM));
00536                         _CurrentUploadTextureLine= 0;
00537                 }
00538 
00539                 <span class="comment">// upload the texture </span>
00540                 pDriver-&gt;uploadTexture (*pText, zeRect, (<a class="code" href="a04558.html#a7">uint8</a>)nMM);
00541 
00542                 nTotalUploaded += nWeight;
00543                 <span class="comment">// If outpass max allocated upload, abort.</span>
00544                 <span class="keywordflow">if</span> (nTotalUploaded &gt; <a class="code" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">_MaxUploadPerFrame</a>)
00545                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00546         }
00547 
00548         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00549 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerh0" doxytag="NL3D::CAsyncTextureManager::validDXTCMipMap" ></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::CAsyncTextureManager::validDXTCMipMap </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03487.html">ITexture</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pText</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static, private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05463.html#l00619">619</a> of file <a class="el" href="a05463.html">async_texture_manager.cpp</a>.
<p>
References <a class="el" href="a05487.html#l00369">NLMISC::CBitmap::getMipMapCount()</a>, and <a class="el" href="a05487.html#l00335">NLMISC::CBitmap::getPixelFormat()</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00361">update()</a>, and <a class="el" href="a05463.html#l00451">uploadTexturePart()</a>.
<p>
<div class="fragment"><pre>00620 {
00621         <span class="keywordflow">return</span> pText-&gt;getMipMapCount()&gt;1 &amp;&amp; (
00622                 pText-&gt;getPixelFormat() == CBitmap::DXTC1 ||
00623                 pText-&gt;getPixelFormat() == CBitmap::DXTC1Alpha ||
00624                 pText-&gt;getPixelFormat() == CBitmap::DXTC3 ||
00625                 pText-&gt;getPixelFormat() == CBitmap::DXTC5 );
00626 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr0" doxytag="NL3D::CAsyncTextureManager::_BaseLodLevel" ></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#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr0">NL3D::CAsyncTextureManager::_BaseLodLevel</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00213">213</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>, <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00121">setupLod()</a>, and <a class="el" href="a05463.html#l00361">update()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr1" doxytag="NL3D::CAsyncTextureManager::_CurrentTextureLodLoaded" ></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="a02233.html">CTextureLod</a>* <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr1">NL3D::CAsyncTextureManager::_CurrentTextureLodLoaded</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00232">232</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, <a class="el" href="a05463.html#l00361">update()</a>, <a class="el" href="a05463.html#l00629">updateTextureLodSystem()</a>, and <a class="el" href="a05463.html#l00089">~CAsyncTextureManager()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr2" doxytag="NL3D::CAsyncTextureManager::_CurrentUploadTexture" ></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="a02231.html">CTextureBase</a>* <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr2">NL3D::CAsyncTextureManager::_CurrentUploadTexture</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00227">227</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, <a class="el" href="a05463.html#l00361">update()</a>, and <a class="el" href="a05463.html#l00089">~CAsyncTextureManager()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr3" doxytag="NL3D::CAsyncTextureManager::_CurrentUploadTextureLine" ></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#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr3">NL3D::CAsyncTextureManager::_CurrentUploadTextureLine</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00229">229</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, and <a class="el" href="a05463.html#l00451">uploadTexturePart()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr4" doxytag="NL3D::CAsyncTextureManager::_CurrentUploadTextureMipMap" ></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#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr4">NL3D::CAsyncTextureManager::_CurrentUploadTextureMipMap</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00228">228</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, and <a class="el" href="a05463.html#l00451">uploadTexturePart()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr5" doxytag="NL3D::CAsyncTextureManager::_FreeTextureIds" ></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::vector&lt;<a class="el" href="a04558.html#a15">uint</a>&gt; <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr5">NL3D::CAsyncTextureManager::_FreeTextureIds</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00222">222</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>, and <a class="el" href="a05463.html#l00232">deleteTexture()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr6" doxytag="NL3D::CAsyncTextureManager::_LastTextureSizeGot" ></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#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr6">NL3D::CAsyncTextureManager::_LastTextureSizeGot</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00218">218</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05464.html#l00115">getLastTextureSizeGot()</a>, and <a class="el" href="a05463.html#l00629">updateTextureLodSystem()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr7" doxytag="NL3D::CAsyncTextureManager::_MaxHLSColoringPerFrame" ></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#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr7">NL3D::CAsyncTextureManager::_MaxHLSColoringPerFrame</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00215">215</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, and <a class="el" href="a05463.html#l00137">setupMaxHLSColoringPerFrame()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr8" doxytag="NL3D::CAsyncTextureManager::_MaxLodLevel" ></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#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr8">NL3D::CAsyncTextureManager::_MaxLodLevel</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00213">213</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00121">setupLod()</a>, and <a class="el" href="a05463.html#l00361">update()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr9" doxytag="NL3D::CAsyncTextureManager::_MaxTotalTextureSize" ></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#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr9">NL3D::CAsyncTextureManager::_MaxTotalTextureSize</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00216">216</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00144">setupMaxTotalTextureSize()</a>, and <a class="el" href="a05463.html#l00629">updateTextureLodSystem()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr10" doxytag="NL3D::CAsyncTextureManager::_MaxUploadPerFrame" ></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#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr10">NL3D::CAsyncTextureManager::_MaxUploadPerFrame</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00214">214</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00130">setupMaxUploadPerFrame()</a>, and <a class="el" href="a05463.html#l00451">uploadTexturePart()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr11" doxytag="NL3D::CAsyncTextureManager::_TextureEntries" ></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::vector&lt;<a class="el" href="a02232.html">CTextureEntry</a>*&gt; <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr11">NL3D::CAsyncTextureManager::_TextureEntries</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00221">221</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05463.html#l00343">getCoarseBitmap()</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, <a class="el" href="a05463.html#l00334">isTextureUpLoaded()</a>, <a class="el" href="a05463.html#l00302">releaseTexture()</a>, <a class="el" href="a05463.html#l00629">updateTextureLodSystem()</a>, and <a class="el" href="a05463.html#l00089">~CAsyncTextureManager()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr12" doxytag="NL3D::CAsyncTextureManager::_TextureEntryMap" ></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="a02230.html#NL3D_1_1CAsyncTextureManagery1">TTextureEntryMap</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr12">NL3D::CAsyncTextureManager::_TextureEntryMap</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00223">223</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, and <a class="el" href="a05463.html#l00089">~CAsyncTextureManager()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr13" doxytag="NL3D::CAsyncTextureManager::_TotalTextureSizeAsked" ></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#a15">uint</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr13">NL3D::CAsyncTextureManager::_TotalTextureSizeAsked</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00217">217</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00104">CAsyncTextureManager()</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05464.html#l00113">getTotalTextureSizeAsked()</a>, and <a class="el" href="a05463.html#l00361">update()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagerr14" doxytag="NL3D::CAsyncTextureManager::_WaitingTextures" ></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::vector&lt;<a class="el" href="a04558.html#a15">uint</a>&gt; <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagerr14">NL3D::CAsyncTextureManager::_WaitingTextures</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05464.html#l00224">224</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>, <a class="el" href="a05463.html#l00232">deleteTexture()</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, and <a class="el" href="a05463.html#l00089">~CAsyncTextureManager()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CAsyncTextureManagero0" doxytag="NL3D::CAsyncTextureManager::HLSManager" ></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="a02638.html">CHLSTextureManager</a> <a class="el" href="a02230.html#NL3D_1_1CAsyncTextureManagero0">NL3D::CAsyncTextureManager::HLSManager</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
User is free to add bank to this manager. Other methods are used by the async manager. 
<p>

<p>
Definition at line <a class="el" href="a05464.html#l00057">57</a> of file <a class="el" href="a05464.html">async_texture_manager.h</a>.
<p>
Referenced by <a class="el" href="a05463.html#l00151">addTextureRef()</a>, <a class="el" href="a05463.html#l00553">getNextTextureToUpLoad()</a>, and <a class="el" href="a05657.html#l01393">NL3D::CDriverUser::loadHLSBank()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a05464.html">async_texture_manager.h</a><li><a class="el" href="a05463.html">async_texture_manager.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:44:33 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>