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
|
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>nevrax.org : docs</TITLE>
<LINK REL=stylesheet TYPE="text/css" HREF="/inc/css/nevrax.css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY MARGINHEIGHT="0" MARGINWIDTH="0">
<!-- uplinks -->
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD WIDTH=16><IMG SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
<TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
<TD WIDTH=16><IMG SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
<TD><IMG width=6 height=14 SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF='/'><b>Home</B></FONT></A> </TD>
<TD><IMG width=6 height=14 SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF='/'><b>nevrax.com</B></FONT></A> </TD>
</TR>
</TABLE>
<!-- banner Nevrax -->
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%>
<TR><TD BGCOLOR="#000000" BACKGROUND="/inc/img/black_banner.jpg"><A HREF=""><IMG SRC="/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
</TABLE>
<!-- main table -->
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%>
<TR>
<TD WIDTH=16><IMG SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
<TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
<!------ Begin Box ------>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
<FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF>
<TABLE cellspacing=0 cellpadding=1 border=0>
<tr><td ALIGN=middle><a class='linkbox' href="/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="/news/" TITLE="News">News</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="/docs/" TITLE="Documentation">Documentation</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="/cvs/" TITLE="CVS Web">CVS</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="/GPL.php3" TITLE="License">License</a></td></tr>
</TABLE>
</TD></TR></TABLE></TD></TR></TABLE>
<!------ End Box ------>
</TD>
<TD WIDTH=15><IMG SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
<TD ALIGN=left valign=top><IMG SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
<!-- title -->
<TABLE background="/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td>
<A HREF="/docs/"><img src="/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
</td><td><IMG SRC="/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
</td></tr></table>
<!-- block -->
<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="/inc/img/reddots.gif"></TD>
<TD><B>Documentation</B></TD>
<TD ALIGN=RIGHT> </td>
</tr></table>
<!-- Generated by Doxygen 1.2.14 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindexRef" doxygen="_cgi:/cgi-bin/nel-search.cgi" href="/cgi-bin/nel-search.cgi">Search</a> </center>
<hr><h1>driver_user.cpp</h1><a href="driver__user_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001
00007 <font class="comment">/* Copyright, 2001 Nevrax Ltd.</font>
00008 <font class="comment"> *</font>
00009 <font class="comment"> * This file is part of NEVRAX NEL.</font>
00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font>
00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font>
00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font>
00013 <font class="comment"> * any later version.</font>
00014 <font class="comment"></font>
00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font>
00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
00018 <font class="comment"> * General Public License for more details.</font>
00019 <font class="comment"></font>
00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font>
00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font>
00023 <font class="comment"> * MA 02111-1307, USA.</font>
00024 <font class="comment"> */</font>
00025
00026 <font class="preprocessor">#include "<a class="code" href="std3d_8h.html">std3d.h</a>"</font>
00027
00028 <font class="comment">// ***************************************************************************</font>
00029 <font class="comment">// THIS FILE IS DIVIDED IN TWO PARTS BECAUSE IT MAKES VISUAL CRASH.</font>
00030 <font class="comment">// fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit</font>
00031 <font class="comment">// ***************************************************************************</font>
00032
00033 <font class="preprocessor">#include "<a class="code" href="driver__user_8h.html">3d/driver_user.h</a>"</font>
00034 <font class="preprocessor">#include "<a class="code" href="u__driver_8h.html">nel/3d/u_driver.h</a>"</font>
00035 <font class="preprocessor">#include "<a class="code" href="dru_8h.html">3d/dru.h</a>"</font>
00036 <font class="preprocessor">#include "<a class="code" href="scene_8h.html">3d/scene.h</a>"</font>
00037 <font class="preprocessor">#include "<a class="code" href="text__context__user_8h.html">3d/text_context_user.h</a>"</font>
00038 <font class="preprocessor">#include "<a class="code" href="texture__user_8h.html">3d/texture_user.h</a>"</font>
00039 <font class="preprocessor">#include "<a class="code" href="material__user_8h.html">3d/material_user.h</a>"</font>
00040 <font class="preprocessor">#include "<a class="code" href="scene__user_8h.html">3d/scene_user.h</a>"</font>
00041 <font class="preprocessor">#include "<a class="code" href="init__3d_8h.html">3d/init_3d.h</a>"</font>
00042 <font class="preprocessor">#include "<a class="code" href="u__camera_8h.html">nel/3d/u_camera.h</a>"</font>
00043 <font class="preprocessor">#include "<a class="code" href="hierarchical__timer_8h.html">nel/misc/hierarchical_timer.h</a>"</font>
00044
00045
00046 <font class="keyword">using</font> <font class="keyword">namespace </font>NLMISC;
00047
00048 <font class="keyword">namespace </font>NL3D
00049 {
00050
00051 <a class="code" href="hierarchical__timer_8h.html#a6">H_AUTO_DECL</a>( NL3D_UI_Driver )
00052 <a class="code" href="hierarchical__timer_8h.html#a6">H_AUTO_DECL</a>( NL3D_Render_DriverClearBuffer )
00053 <a class="code" href="hierarchical__timer_8h.html#a6">H_AUTO_DECL</a>( NL3D_Render_DriverSwapBuffer )
00054 <a class="code" href="hierarchical__timer_8h.html#a6">H_AUTO_DECL</a>( NL3D_Render_DriverDrawELT )
00055
<a name="l00056"></a><a class="code" href="driver__user_8cpp.html#a0">00056</a> <font class="preprocessor">#define NL3D_HAUTO_UI_DRIVER H_AUTO_USE( NL3D_UI_Driver )</font>
<a name="l00057"></a><a class="code" href="driver__user_8cpp.html#a1">00057</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_HAUTO_CLEAR_DRIVER H_AUTO_USE( NL3D_Render_DriverClearBuffer )</font>
<a name="l00058"></a><a class="code" href="driver__user_8cpp.html#a2">00058</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_HAUTO_SWAP_DRIVER H_AUTO_USE( NL3D_Render_DriverSwapBuffer )</font>
<a name="l00059"></a><a class="code" href="driver__user_8cpp.html#a3">00059</a> <font class="preprocessor"></font><font class="preprocessor">#define NL3D_HAUTO_DRAW_DRIVER H_AUTO_USE( NL3D_Render_DriverDrawELT )</font>
00060 <font class="preprocessor"></font>
00061 <font class="comment">// ***************************************************************************</font>
00062 <font class="comment">// ***************************************************************************</font>
00063 <font class="comment">// UDriver implementation (gcc link bug force to not put them in .h).</font>
00064 <font class="comment">// ***************************************************************************</font>
00065 <font class="comment">// ***************************************************************************</font>
00066
00067
00068 <font class="comment">// ***************************************************************************</font>
<a name="l00069"></a><a class="code" href="classNL3D_1_1UDriver.html#z13_0">00069</a> UDriver::UDriver()
00070 {
00071 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00072 }
00073 <font class="comment">// ***************************************************************************</font>
<a name="l00074"></a><a class="code" href="classNL3D_1_1UDriver.html#z13_1">00074</a> UDriver::~UDriver()
00075 {
00076 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00077 }
00078
00079
00080 <font class="comment">// ***************************************************************************</font>
<a name="l00081"></a><a class="code" href="classNL3D_1_1UDriver.html#z21_11">00081</a> <font class="keywordtype">void</font> UDriver::setMatrixMode2D11()
00082 {
00083 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00084 <a class="code" href="classNL3D_1_1UDriver.html#z21_10">setMatrixMode2D</a>(CFrustum(0.0f,1.0f,0.0f,1.0f,-1.0f,1.0f,<font class="keyword">false</font>));
00085 }
00086 <font class="comment">// ***************************************************************************</font>
<a name="l00087"></a><a class="code" href="classNL3D_1_1UDriver.html#z21_12">00087</a> <font class="keywordtype">void</font> UDriver::setMatrixMode2D43()
00088 {
00089 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00090 <a class="code" href="classNL3D_1_1UDriver.html#z21_10">setMatrixMode2D</a>(CFrustum(0.0f,4.0f/3.0f,0.0f,1.0f,-1.0f,1.0f,<font class="keyword">false</font>));
00091 }
00092
00093
00094 <font class="comment">// ***************************************************************************</font>
<a name="l00095"></a><a class="code" href="classNL3D_1_1UDriver.html#d0">00095</a> UDriver *UDriver::createDriver()
00096 {
00097 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00098 <font class="keywordflow">return</font> <font class="keyword">new</font> CDriverUser;
00099 }
00100
00101
00102 <font class="comment">// ***************************************************************************</font>
00103 <font class="comment">// ***************************************************************************</font>
00104 <font class="comment">// WINDOWS Management.</font>
00105 <font class="comment">// ***************************************************************************</font>
00106 <font class="comment">// ***************************************************************************</font>
00107
00108
00109 <font class="comment">// ***************************************************************************</font>
<a name="l00110"></a><a class="code" href="classNL3D_1_1CDriverUser.html#q0">00110</a> <font class="keywordtype">bool</font> CDriverUser::_StaticInit= <font class="keyword">false</font>;
00111
00112
00113 <font class="comment">// ***************************************************************************</font>
<a name="l00114"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z435_0">00114</a> CDriverUser::CDriverUser()
00115 {
00116 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00117
00118 <font class="comment">// The enum of IDriver and UDriver MUST be the same!!!</font>
00119 <a class="code" href="debug_8h.html#a6">nlassert</a>((uint)IDriver::idCount == (uint)UDriver::idCount);
00120 <a class="code" href="debug_8h.html#a6">nlassert</a>((uint)IDriver::typeCount == (uint)UDriver::typeCount);
00121 <a class="code" href="debug_8h.html#a6">nlassert</a>((uint)IDriver::iconCount == (uint)UDriver::iconCount);
00122
00123
00124 <font class="comment">// Static Initialisation.</font>
00125 <font class="keywordflow">if</font>(!<a class="code" href="classNL3D_1_1CDriverUser.html#q0">_StaticInit</a>)
00126 {
00127 <a class="code" href="classNL3D_1_1CDriverUser.html#q0">_StaticInit</a>= <font class="keyword">true</font>;
00128 <font class="comment">// Register basic serial.</font>
00129 <a class="code" href="namespaceNL3D.html#a455">NL3D::registerSerial3d</a>();
00130
00131 <font class="comment">// Register basic csene.</font>
00132 CScene::registerBasics();
00133 }
00134
00135 <font class="comment">// Create/Init Driver.</font>
00136 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>= CDRU::createGlDriver();
00137 <a class="code" href="debug_8h.html#a6">nlassert</a>(<a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>);
00138 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->init();
00139
00140 <a class="code" href="classNL3D_1_1CDriverUser.html#n1">_WindowInit</a>= <font class="keyword">false</font>;
00141
00142 <font class="comment">// Init of VBuffers/PBs for 2D/3D interface.</font>
00143 <a class="code" href="classNL3D_1_1CDriverUser.html#n12">_VBFlat</a>.setVertexFormat(CVertexBuffer::PositionFlag);
00144 <a class="code" href="classNL3D_1_1CDriverUser.html#n13">_VBColor</a>.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::PrimaryColorFlag);
00145 <a class="code" href="classNL3D_1_1CDriverUser.html#n14">_VBUv</a>.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag);
00146 <a class="code" href="classNL3D_1_1CDriverUser.html#n15">_VBColorUv</a>.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::PrimaryColorFlag | CVertexBuffer::TexCoord0Flag);
00147 <a class="code" href="classNL3D_1_1CDriverUser.html#n19">_VBQuadsColUv</a>.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::PrimaryColorFlag | CVertexBuffer::TexCoord0Flag);
00148 <font class="comment">// max is quad.</font>
00149 <a class="code" href="classNL3D_1_1CDriverUser.html#n12">_VBFlat</a>.setNumVertices(4);
00150 <a class="code" href="classNL3D_1_1CDriverUser.html#n13">_VBColor</a>.setNumVertices(4);
00151 <a class="code" href="classNL3D_1_1CDriverUser.html#n14">_VBUv</a>.setNumVertices(4);
00152 <a class="code" href="classNL3D_1_1CDriverUser.html#n15">_VBColorUv</a>.setNumVertices(4);
00153
00154 <a class="code" href="classNL3D_1_1CDriverUser.html#n16">_PBLine</a>.setNumLine(1);
00155 <a class="code" href="classNL3D_1_1CDriverUser.html#n16">_PBLine</a>.setLine(0, 0, 1);
00156 <a class="code" href="classNL3D_1_1CDriverUser.html#n17">_PBTri</a>.setNumTri(1);
00157 <a class="code" href="classNL3D_1_1CDriverUser.html#n17">_PBTri</a>.setTri(0, 0, 1, 2);
00158 <a class="code" href="classNL3D_1_1CDriverUser.html#n18">_PBQuad</a>.setNumQuad(1);
00159 <a class="code" href="classNL3D_1_1CDriverUser.html#n18">_PBQuad</a>.setQuad(0, 0, 1, 2, 3);
00160
00161 }
00162 <font class="comment">// ***************************************************************************</font>
<a name="l00163"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z435_1">00163</a> CDriverUser::~CDriverUser()
00164 {
00165 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00166 <a class="code" href="classNL3D_1_1CDriverUser.html#z436_5">release</a>();
00167
00168 <font class="keyword">delete</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>;
00169 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>= NULL;
00170 }
00171
00172 <font class="comment">// ***************************************************************************</font>
<a name="l00173"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z436_0">00173</a> UDriver::TModeList CDriverUser::enumModes()
00174 {
00175 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00176 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00177
00178 <a class="code" href="namespaceNL3D.html#a28">ModeList</a> dlist;
00179 <a class="code" href="classNL3D_1_1UDriver.html#s0">TModeList</a> retlist;
00180
00181 dlist= <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->enumModes();
00182 <font class="keywordflow">for</font>(sint i=0;i<(sint)dlist.size();i++)
00183 {
00184 retlist.push_back(CMode(dlist[i].Width, dlist[i].Height, dlist[i].Depth, dlist[i].Windowed));
00185 }
00186
00187 <font class="keywordflow">return</font> retlist;
00188 }
00189
00190 <font class="comment">// ***************************************************************************</font>
<a name="l00191"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z436_1">00191</a> <font class="keywordtype">void</font> CDriverUser::disableHardwareVertexProgram()
00192 {
00193 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00194 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00195
00196 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->disableHardwareVertexProgram();
00197 }
<a name="l00198"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z436_2">00198</a> <font class="keywordtype">void</font> CDriverUser::disableHardwareVertexArrayAGP()
00199 {
00200 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00201 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00202
00203 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->disableHardwareVertexArrayAGP();
00204 }
<a name="l00205"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z436_3">00205</a> <font class="keywordtype">void</font> CDriverUser::disableHardwareTextureShader()
00206 {
00207 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00208 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00209
00210 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->disableHardwareTextureShader();
00211 }
00212
00213 <font class="comment">// ***************************************************************************</font>
<a name="l00214"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z436_4">00214</a> <font class="keywordtype">void</font> CDriverUser::setDisplay(<font class="keyword">const</font> CMode &mode)
00215 {
00216 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00217 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00218
00219 <font class="comment">// window init.</font>
00220 <a class="code" href="debug_8h.html#a9">nlverify</a>(<a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->setDisplay(NULL, GfxMode(mode.Width, mode.Height, mode.Depth, mode.Windowed)));
00221 <a class="code" href="debug_8h.html#a9">nlverify</a>(<a class="code" href="classNL3D_1_1CDriverUser.html#z436_6">activate</a>());
00222 <a class="code" href="classNL3D_1_1CDriverUser.html#n1">_WindowInit</a>= <font class="keyword">true</font>;
00223
00224 <font class="comment">// Event init.</font>
00225 <a class="code" href="classNL3D_1_1UDriver.html#m1">AsyncListener</a>.<a class="code" href="classNLMISC_1_1CEventListenerAsync.html#a6">reset</a> ();
00226 <a class="code" href="classNL3D_1_1UDriver.html#m0">EventServer</a>.<a class="code" href="classNLMISC_1_1CEventServer.html#a5">addEmitter</a>(<a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getEventEmitter());
00227 <a class="code" href="classNL3D_1_1UDriver.html#m1">AsyncListener</a>.<a class="code" href="classNLMISC_1_1CEventListenerAsync.html#a2">addToServer</a>(<a class="code" href="classNL3D_1_1UDriver.html#m0">EventServer</a>);
00228
00229 <font class="comment">// Matrix Context (2D).</font>
00230 <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m1">Viewport</a>.initFullScreen();
00231 <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m0">Scissor</a>.initFullScreen();
00232 <a class="code" href="classNL3D_1_1UDriver.html#z21_11">setMatrixMode2D11</a>();
00233
00234 <font class="comment">// 2D Material.</font>
00235 <a class="code" href="classNL3D_1_1CDriverUser.html#n20">_MatFlat</a>.initUnlit();
00236 <a class="code" href="classNL3D_1_1CDriverUser.html#n20">_MatFlat</a>.setZFunc(UMaterial::always);
00237 <a class="code" href="classNL3D_1_1CDriverUser.html#n20">_MatFlat</a>.setZWrite(<font class="keyword">false</font>);
00238 <a class="code" href="classNL3D_1_1CDriverUser.html#n21">_MatText</a>.initUnlit();
00239 <a class="code" href="classNL3D_1_1CDriverUser.html#n21">_MatText</a>.setZFunc(UMaterial::always);
00240 <a class="code" href="classNL3D_1_1CDriverUser.html#n21">_MatText</a>.setZWrite(<font class="keyword">false</font>);
00241
00242 }
00243 <font class="comment">// ***************************************************************************</font>
<a name="l00244"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z436_5">00244</a> <font class="keywordtype">void</font> CDriverUser::release()
00245 {
00246 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00247 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00248
00249 <font class="keywordflow">if</font>(!<a class="code" href="classNL3D_1_1CDriverUser.html#n1">_WindowInit</a>)
00250 <font class="keywordflow">return</font>;
00251
00252 <font class="comment">// 2D Material.</font>
00253 <a class="code" href="classNL3D_1_1CDriverUser.html#n20">_MatFlat</a>.initUnlit();
00254 <a class="code" href="classNL3D_1_1CDriverUser.html#n21">_MatText</a>.initUnlit();
00255
00256 <font class="comment">// delete Texture, mat ... list.</font>
00257 <a class="code" href="classNL3D_1_1CDriverUser.html#n4">_Textures</a>.clear();
00258 <a class="code" href="classNL3D_1_1CDriverUser.html#n5">_Materials</a>.clear();
00259 <a class="code" href="classNL3D_1_1CDriverUser.html#n6">_TextContexts</a>.clear();
00260 <a class="code" href="classNL3D_1_1CDriverUser.html#n7">_Scenes</a>.clear();
00261
00262 <font class="comment">// release event.</font>
00263 <a class="code" href="classNL3D_1_1UDriver.html#m1">AsyncListener</a>.<a class="code" href="classNLMISC_1_1CEventListenerAsync.html#a3">removeFromServer</a>(<a class="code" href="classNL3D_1_1UDriver.html#m0">EventServer</a>);
00264 <a class="code" href="classNL3D_1_1UDriver.html#m0">EventServer</a>.<a class="code" href="classNLMISC_1_1CEventServer.html#a6">removeEmitter</a>(<a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getEventEmitter());
00265
00266 <font class="comment">// release window.</font>
00267 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->release();
00268 <a class="code" href="classNL3D_1_1CDriverUser.html#n1">_WindowInit</a>= <font class="keyword">false</font>;
00269 }
00270
00271
00272 <font class="comment">// ***************************************************************************</font>
<a name="l00273"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z436_6">00273</a> <font class="keywordtype">bool</font> CDriverUser::activate(<font class="keywordtype">void</font>)
00274 {
00275 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00276 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00277
00278 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activate();
00279 }
00280
00281 <font class="comment">// ***************************************************************************</font>
<a name="l00282"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z436_7">00282</a> <font class="keywordtype">bool</font> CDriverUser::isActive()
00283 {
00284 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00285 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00286
00287 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->isActive();
00288 }
00289
00290
00291
00292 <font class="comment">// ***************************************************************************</font>
00293 <font class="comment">// ***************************************************************************</font>
00294 <font class="comment">// Matrix context.</font>
00295 <font class="comment">// ***************************************************************************</font>
00296 <font class="comment">// ***************************************************************************</font>
00297
00298
00299 <font class="comment">// ***************************************************************************</font>
<a name="l00300"></a><a class="code" href="classNL3D_1_1CDriverUser.html#b0">00300</a> <font class="keywordtype">void</font> CDriverUser::setupMatrixContext()
00301 {
00302 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00303
00304 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->setupScissor(<a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m0">Scissor</a>);
00305 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->setupViewport(<a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m1">Viewport</a>);
00306 CFrustum &f= <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m2">Frustum</a>;
00307 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->setFrustum(f.Left, f.Right, f.Bottom, f.Top, f.Near, f.Far, f.Perspective);
00308 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->setupViewMatrix(<a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m3">ViewMatrix</a>);
00309 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->setupModelMatrix(<a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m4">ModelMatrix</a>);
00310 }
00311 <font class="comment">// ***************************************************************************</font>
<a name="l00312"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z442_0">00312</a> <font class="keywordtype">void</font> CDriverUser::setScissor(<font class="keyword">const</font> CScissor &sc)
00313 {
00314 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00315 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00316
00317 <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m0">Scissor</a>= sc;
00318 <a class="code" href="classNL3D_1_1CDriverUser.html#b0">setupMatrixContext</a>();
00319 }
00320 <font class="comment">// ***************************************************************************</font>
<a name="l00321"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z442_1">00321</a> CScissor CDriverUser::getScissor()
00322 {
00323 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00324 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00325
00326 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m0">Scissor</a>;
00327 }
00328 <font class="comment">// ***************************************************************************</font>
<a name="l00329"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z442_2">00329</a> <font class="keywordtype">void</font> CDriverUser::setViewport(<font class="keyword">const</font> CViewport &vp)
00330 {
00331 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00332 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00333
00334 <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m1">Viewport</a>= vp;
00335 <a class="code" href="classNL3D_1_1CDriverUser.html#b0">setupMatrixContext</a>();
00336 }
00337 <font class="comment">// ***************************************************************************</font>
<a name="l00338"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z442_3">00338</a> CViewport CDriverUser::getViewport()
00339 {
00340 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00341 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00342
00343 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m1">Viewport</a>;
00344 }
00345 <font class="comment">// ***************************************************************************</font>
<a name="l00346"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z442_4">00346</a> <font class="keywordtype">void</font> CDriverUser::setFrustum(<font class="keyword">const</font> CFrustum &frust)
00347 {
00348 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00349 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00350
00351 <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m2">Frustum</a>= frust;
00352 <a class="code" href="classNL3D_1_1CDriverUser.html#b0">setupMatrixContext</a>();
00353 }
00354 <font class="comment">// ***************************************************************************</font>
<a name="l00355"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z442_5">00355</a> CFrustum CDriverUser::getFrustum()
00356 {
00357 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00358 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00359
00360 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m2">Frustum</a>;
00361 }
00362 <font class="comment">// ***************************************************************************</font>
<a name="l00363"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z442_6">00363</a> <font class="keywordtype">void</font> CDriverUser::setViewMatrix(<font class="keyword">const</font> CMatrix &mat)
00364 {
00365 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00366 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00367
00368 <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m3">ViewMatrix</a>= mat;
00369 <a class="code" href="classNL3D_1_1CDriverUser.html#b0">setupMatrixContext</a>();
00370 }
00371 <font class="comment">// ***************************************************************************</font>
<a name="l00372"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z442_7">00372</a> CMatrix CDriverUser::getViewMatrix()
00373 {
00374 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00375 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00376
00377 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m3">ViewMatrix</a>;
00378 }
00379 <font class="comment">// ***************************************************************************</font>
<a name="l00380"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z442_8">00380</a> <font class="keywordtype">void</font> CDriverUser::setModelMatrix(<font class="keyword">const</font> CMatrix &mat)
00381 {
00382 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00383 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00384
00385 <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m4">ModelMatrix</a>= mat;
00386 <a class="code" href="classNL3D_1_1CDriverUser.html#b0">setupMatrixContext</a>();
00387 }
00388 <font class="comment">// ***************************************************************************</font>
<a name="l00389"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z442_9">00389</a> CMatrix CDriverUser::getModelMatrix()
00390 {
00391 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00392 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00393
00394 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m4">ModelMatrix</a>;
00395 }
00396
00397
00398
00399 <font class="comment">// ***************************************************************************</font>
<a name="l00400"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z442_10">00400</a> <font class="keywordtype">void</font> CDriverUser::setMatrixMode2D(<font class="keyword">const</font> CFrustum &frust)
00401 {
00402 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00403 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00404
00405 <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m2">Frustum</a>= frust;
00406 <font class="comment">// We still work in NL3D coordinates, so must convert y to z.</font>
00407 CVector I(1,0,0);
00408 CVector J(0,0,1);
00409 CVector K(0,-1,0);
00410
00411 <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m3">ViewMatrix</a>.identity();
00412 <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m3">ViewMatrix</a>.setRot(I,J,K, <font class="keyword">true</font>);
00413 <a class="code" href="classNL3D_1_1CDriverUser.html#n2">_CurrentMatrixContext</a>.<a class="code" href="structNL3D_1_1CDriverUser_1_1CMatrixContext.html#m4">ModelMatrix</a>.identity();
00414
00415 <a class="code" href="classNL3D_1_1CDriverUser.html#b0">setupMatrixContext</a>();
00416 }
00417 <font class="comment">// ***************************************************************************</font>
<a name="l00418"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z442_11">00418</a> <font class="keywordtype">void</font> CDriverUser::setMatrixMode3D(UCamera &camera)
00419 {
00420 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00421 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00422
00423 <font class="comment">// Retrieve the matrix and frustum from the camera.</font>
00424 CMatrix viewMat;
00425 viewMat= camera.getMatrix();
00426 viewMat.invert();
00427 <a class="code" href="classNL3D_1_1CDriverUser.html#z442_6">setViewMatrix</a>(viewMat);
00428 <a class="code" href="classNL3D_1_1CDriverUser.html#z442_8">setModelMatrix</a>(CMatrix::Identity);
00429 <a class="code" href="classNL3D_1_1CDriverUser.html#z442_4">setFrustum</a>(camera.getFrustum());
00430 }
00431
00432
00433 <font class="comment">// ***************************************************************************</font>
00434 <font class="comment">// ***************************************************************************</font>
00435 <font class="comment">// 2D/3D INTERFACE.</font>
00436 <font class="comment">// ***************************************************************************</font>
00437 <font class="comment">// ***************************************************************************</font>
00438
00439 <font class="comment">// ***************************************************************************</font>
<a name="l00440"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_0">00440</a> <font class="keywordtype">void</font> CDriverUser::drawLine(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CLine.html">NLMISC::CLine</a> &shp, UMaterial &mat)
00441 {
00442 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00443 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00444
00445 CVertexBuffer &vb= <a class="code" href="classNL3D_1_1CDriverUser.html#n12">_VBFlat</a>;
00446 CPrimitiveBlock &pb= <a class="code" href="classNL3D_1_1CDriverUser.html#n16">_PBLine</a>;
00447
00448 vb.setVertexCoord (0, shp.<a class="code" href="classNLMISC_1_1CLine.html#m0">V0</a>);
00449 vb.setVertexCoord (1, shp.<a class="code" href="classNLMISC_1_1CLine.html#m1">V1</a>);
00450
00451 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activeVertexBuffer(vb);
00452 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->render(pb, <a class="code" href="classNL3D_1_1CDriverUser.html#b1">convMat</a>(mat));
00453 }
00454 <font class="comment">// ***************************************************************************</font>
<a name="l00455"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_1">00455</a> <font class="keywordtype">void</font> CDriverUser::drawLine(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CLineColor.html">NLMISC::CLineColor</a> &shp, UMaterial &mat)
00456 {
00457 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00458 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00459
00460 CVertexBuffer &vb= <a class="code" href="classNL3D_1_1CDriverUser.html#n13">_VBColor</a>;
00461 CPrimitiveBlock &pb= <a class="code" href="classNL3D_1_1CDriverUser.html#n16">_PBLine</a>;
00462
00463 vb.setVertexCoord (0, shp.<a class="code" href="classNLMISC_1_1CLine.html#m0">V0</a>);
00464 vb.setVertexCoord (1, shp.<a class="code" href="classNLMISC_1_1CLine.html#m1">V1</a>);
00465 vb.setColor(0, shp.<a class="code" href="classNLMISC_1_1CLineColor.html#m0">Color0</a>);
00466 vb.setColor(1, shp.<a class="code" href="classNLMISC_1_1CLineColor.html#m1">Color1</a>);
00467
00468 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activeVertexBuffer(vb);
00469 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->render(pb, <a class="code" href="classNL3D_1_1CDriverUser.html#b1">convMat</a>(mat));
00470 }
00471 <font class="comment">// ***************************************************************************</font>
<a name="l00472"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_2">00472</a> <font class="keywordtype">void</font> CDriverUser::drawLine(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CLineUV.html">NLMISC::CLineUV</a> &shp, UMaterial &mat)
00473 {
00474 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00475 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00476
00477 CVertexBuffer &vb= <a class="code" href="classNL3D_1_1CDriverUser.html#n14">_VBUv</a>;
00478 CPrimitiveBlock &pb= <a class="code" href="classNL3D_1_1CDriverUser.html#n16">_PBLine</a>;
00479
00480 vb.setVertexCoord (0, shp.<a class="code" href="classNLMISC_1_1CLine.html#m0">V0</a>);
00481 vb.setVertexCoord (1, shp.<a class="code" href="classNLMISC_1_1CLine.html#m1">V1</a>);
00482 vb.setTexCoord (0, 0, shp.<a class="code" href="classNLMISC_1_1CLineUV.html#m0">Uv0</a>);
00483 vb.setTexCoord (1, 0, shp.<a class="code" href="classNLMISC_1_1CLineUV.html#m1">Uv1</a>);
00484
00485 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activeVertexBuffer(vb);
00486 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->render(pb, <a class="code" href="classNL3D_1_1CDriverUser.html#b1">convMat</a>(mat));
00487 }
00488 <font class="comment">// ***************************************************************************</font>
<a name="l00489"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_3">00489</a> <font class="keywordtype">void</font> CDriverUser::drawLine(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CLineColorUV.html">NLMISC::CLineColorUV</a> &shp, UMaterial &mat)
00490 {
00491 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00492 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00493
00494 CVertexBuffer &vb= <a class="code" href="classNL3D_1_1CDriverUser.html#n15">_VBColorUv</a>;
00495 CPrimitiveBlock &pb= <a class="code" href="classNL3D_1_1CDriverUser.html#n16">_PBLine</a>;
00496
00497 vb.setVertexCoord (0, shp.<a class="code" href="classNLMISC_1_1CLine.html#m0">V0</a>);
00498 vb.setVertexCoord (1, shp.<a class="code" href="classNLMISC_1_1CLine.html#m1">V1</a>);
00499 vb.setColor(0, shp.<a class="code" href="classNLMISC_1_1CLineColorUV.html#m0">Color0</a>);
00500 vb.setColor(1, shp.<a class="code" href="classNLMISC_1_1CLineColorUV.html#m1">Color1</a>);
00501 vb.setTexCoord (0, 0, shp.<a class="code" href="classNLMISC_1_1CLineColorUV.html#m2">Uv0</a>);
00502 vb.setTexCoord (1, 0, shp.<a class="code" href="classNLMISC_1_1CLineColorUV.html#m3">Uv1</a>);
00503
00504 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activeVertexBuffer(vb);
00505 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->render(pb, <a class="code" href="classNL3D_1_1CDriverUser.html#b1">convMat</a>(mat));
00506 }
00507
00508
00509
00510 <font class="comment">// ***************************************************************************</font>
<a name="l00511"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_4">00511</a> <font class="keywordtype">void</font> CDriverUser::drawTriangle(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CTriangle.html">NLMISC::CTriangle</a> &shp, UMaterial &mat)
00512 {
00513 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00514 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00515
00516 CVertexBuffer &vb= <a class="code" href="classNL3D_1_1CDriverUser.html#n12">_VBFlat</a>;
00517 CPrimitiveBlock &pb= <a class="code" href="classNL3D_1_1CDriverUser.html#n17">_PBTri</a>;
00518
00519 vb.setVertexCoord (0, shp.<a class="code" href="classNLMISC_1_1CTriangle.html#m0">V0</a>);
00520 vb.setVertexCoord (1, shp.<a class="code" href="classNLMISC_1_1CTriangle.html#m1">V1</a>);
00521 vb.setVertexCoord (2, shp.<a class="code" href="classNLMISC_1_1CTriangle.html#m2">V2</a>);
00522
00523 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activeVertexBuffer(vb);
00524 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->render(pb, <a class="code" href="classNL3D_1_1CDriverUser.html#b1">convMat</a>(mat));
00525 }
00526 <font class="comment">// ***************************************************************************</font>
<a name="l00527"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_5">00527</a> <font class="keywordtype">void</font> CDriverUser::drawTriangle(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CTriangleColor.html">NLMISC::CTriangleColor</a> &shp, UMaterial &mat)
00528 {
00529 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00530 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00531
00532 CVertexBuffer &vb= <a class="code" href="classNL3D_1_1CDriverUser.html#n13">_VBColor</a>;
00533 CPrimitiveBlock &pb= <a class="code" href="classNL3D_1_1CDriverUser.html#n17">_PBTri</a>;
00534
00535 vb.setVertexCoord (0, shp.<a class="code" href="classNLMISC_1_1CTriangle.html#m0">V0</a>);
00536 vb.setVertexCoord (1, shp.<a class="code" href="classNLMISC_1_1CTriangle.html#m1">V1</a>);
00537 vb.setVertexCoord (2, shp.<a class="code" href="classNLMISC_1_1CTriangle.html#m2">V2</a>);
00538 vb.setColor(0, shp.<a class="code" href="classNLMISC_1_1CTriangleColor.html#m0">Color0</a>);
00539 vb.setColor(1, shp.<a class="code" href="classNLMISC_1_1CTriangleColor.html#m1">Color1</a>);
00540 vb.setColor(2, shp.<a class="code" href="classNLMISC_1_1CTriangleColor.html#m2">Color2</a>);
00541
00542 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activeVertexBuffer(vb);
00543 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->render(pb, <a class="code" href="classNL3D_1_1CDriverUser.html#b1">convMat</a>(mat));
00544 }
00545 <font class="comment">// ***************************************************************************</font>
<a name="l00546"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_6">00546</a> <font class="keywordtype">void</font> CDriverUser::drawTriangle(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CTriangleUV.html">NLMISC::CTriangleUV</a> &shp, UMaterial &mat)
00547 {
00548 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00549 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00550
00551 CVertexBuffer &vb= <a class="code" href="classNL3D_1_1CDriverUser.html#n14">_VBUv</a>;
00552 CPrimitiveBlock &pb= <a class="code" href="classNL3D_1_1CDriverUser.html#n17">_PBTri</a>;
00553
00554 vb.setVertexCoord (0, shp.<a class="code" href="classNLMISC_1_1CTriangle.html#m0">V0</a>);
00555 vb.setVertexCoord (1, shp.<a class="code" href="classNLMISC_1_1CTriangle.html#m1">V1</a>);
00556 vb.setVertexCoord (2, shp.<a class="code" href="classNLMISC_1_1CTriangle.html#m2">V2</a>);
00557 vb.setTexCoord (0, 0, shp.<a class="code" href="classNLMISC_1_1CTriangleUV.html#m0">Uv0</a>);
00558 vb.setTexCoord (1, 0, shp.<a class="code" href="classNLMISC_1_1CTriangleUV.html#m1">Uv1</a>);
00559 vb.setTexCoord (2, 0, shp.<a class="code" href="classNLMISC_1_1CTriangleUV.html#m2">Uv2</a>);
00560
00561 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activeVertexBuffer(vb);
00562 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->render(pb, <a class="code" href="classNL3D_1_1CDriverUser.html#b1">convMat</a>(mat));
00563 }
00564 <font class="comment">// ***************************************************************************</font>
<a name="l00565"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_7">00565</a> <font class="keywordtype">void</font> CDriverUser::drawTriangle(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CTriangleColorUV.html">NLMISC::CTriangleColorUV</a> &shp, UMaterial &mat)
00566 {
00567 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00568 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00569
00570 CVertexBuffer &vb= <a class="code" href="classNL3D_1_1CDriverUser.html#n15">_VBColorUv</a>;
00571 CPrimitiveBlock &pb= <a class="code" href="classNL3D_1_1CDriverUser.html#n17">_PBTri</a>;
00572
00573 vb.setVertexCoord (0, shp.<a class="code" href="classNLMISC_1_1CTriangle.html#m0">V0</a>);
00574 vb.setVertexCoord (1, shp.<a class="code" href="classNLMISC_1_1CTriangle.html#m1">V1</a>);
00575 vb.setVertexCoord (2, shp.<a class="code" href="classNLMISC_1_1CTriangle.html#m2">V2</a>);
00576 vb.setColor(0, shp.<a class="code" href="classNLMISC_1_1CTriangleColorUV.html#m0">Color0</a>);
00577 vb.setColor(1, shp.<a class="code" href="classNLMISC_1_1CTriangleColorUV.html#m1">Color1</a>);
00578 vb.setColor(2, shp.<a class="code" href="classNLMISC_1_1CTriangleColorUV.html#m2">Color2</a>);
00579 vb.setTexCoord (0, 0, shp.<a class="code" href="classNLMISC_1_1CTriangleColorUV.html#m3">Uv0</a>);
00580 vb.setTexCoord (1, 0, shp.<a class="code" href="classNLMISC_1_1CTriangleColorUV.html#m4">Uv1</a>);
00581 vb.setTexCoord (2, 0, shp.<a class="code" href="classNLMISC_1_1CTriangleColorUV.html#m5">Uv2</a>);
00582
00583 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activeVertexBuffer(vb);
00584 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->render(pb, <a class="code" href="classNL3D_1_1CDriverUser.html#b1">convMat</a>(mat));
00585 }
00586
00587
00588
00589 <font class="comment">// ***************************************************************************</font>
<a name="l00590"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_8">00590</a> <font class="keywordtype">void</font> CDriverUser::drawQuad(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CQuad.html">NLMISC::CQuad</a> &shp, UMaterial &mat)
00591 {
00592 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00593 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00594
00595 CVertexBuffer &vb= <a class="code" href="classNL3D_1_1CDriverUser.html#n12">_VBFlat</a>;
00596 CPrimitiveBlock &pb= <a class="code" href="classNL3D_1_1CDriverUser.html#n18">_PBQuad</a>;
00597
00598 vb.setVertexCoord (0, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m0">V0</a>);
00599 vb.setVertexCoord (1, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m1">V1</a>);
00600 vb.setVertexCoord (2, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m2">V2</a>);
00601 vb.setVertexCoord (3, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m3">V3</a>);
00602
00603 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activeVertexBuffer(vb);
00604 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->render(pb, <a class="code" href="classNL3D_1_1CDriverUser.html#b1">convMat</a>(mat));
00605 }
00606 <font class="comment">// ***************************************************************************</font>
<a name="l00607"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_9">00607</a> <font class="keywordtype">void</font> CDriverUser::drawQuad(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CQuadColor.html">NLMISC::CQuadColor</a> &shp, UMaterial &mat)
00608 {
00609 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00610 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00611
00612 CVertexBuffer &vb= <a class="code" href="classNL3D_1_1CDriverUser.html#n13">_VBColor</a>;
00613 CPrimitiveBlock &pb= <a class="code" href="classNL3D_1_1CDriverUser.html#n18">_PBQuad</a>;
00614
00615 vb.setVertexCoord (0, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m0">V0</a>);
00616 vb.setVertexCoord (1, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m1">V1</a>);
00617 vb.setVertexCoord (2, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m2">V2</a>);
00618 vb.setVertexCoord (3, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m3">V3</a>);
00619 vb.setColor(0, shp.<a class="code" href="classNLMISC_1_1CQuadColor.html#m0">Color0</a>);
00620 vb.setColor(1, shp.<a class="code" href="classNLMISC_1_1CQuadColor.html#m1">Color1</a>);
00621 vb.setColor(2, shp.<a class="code" href="classNLMISC_1_1CQuadColor.html#m2">Color2</a>);
00622 vb.setColor(3, shp.<a class="code" href="classNLMISC_1_1CQuadColor.html#m3">Color3</a>);
00623
00624 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activeVertexBuffer(vb);
00625 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->render(pb, <a class="code" href="classNL3D_1_1CDriverUser.html#b1">convMat</a>(mat));
00626 }
00627 <font class="comment">// ***************************************************************************</font>
<a name="l00628"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_10">00628</a> <font class="keywordtype">void</font> CDriverUser::drawQuad(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CQuadUV.html">NLMISC::CQuadUV</a> &shp, UMaterial &mat)
00629 {
00630 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00631 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00632
00633 CVertexBuffer &vb= <a class="code" href="classNL3D_1_1CDriverUser.html#n14">_VBUv</a>;
00634 CPrimitiveBlock &pb= <a class="code" href="classNL3D_1_1CDriverUser.html#n18">_PBQuad</a>;
00635
00636 vb.setVertexCoord (0, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m0">V0</a>);
00637 vb.setVertexCoord (1, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m1">V1</a>);
00638 vb.setVertexCoord (2, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m2">V2</a>);
00639 vb.setVertexCoord (3, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m3">V3</a>);
00640 vb.setTexCoord (0, 0, shp.<a class="code" href="classNLMISC_1_1CQuadUV.html#m0">Uv0</a>);
00641 vb.setTexCoord (1, 0, shp.<a class="code" href="classNLMISC_1_1CQuadUV.html#m1">Uv1</a>);
00642 vb.setTexCoord (2, 0, shp.<a class="code" href="classNLMISC_1_1CQuadUV.html#m2">Uv2</a>);
00643 vb.setTexCoord (3, 0, shp.<a class="code" href="classNLMISC_1_1CQuadUV.html#m3">Uv3</a>);
00644
00645 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activeVertexBuffer(vb);
00646 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->render(pb, <a class="code" href="classNL3D_1_1CDriverUser.html#b1">convMat</a>(mat));
00647 }
00648 <font class="comment">// ***************************************************************************</font>
<a name="l00649"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_11">00649</a> <font class="keywordtype">void</font> CDriverUser::drawQuad(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CQuadColorUV.html">NLMISC::CQuadColorUV</a> &shp, UMaterial &mat)
00650 {
00651 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00652 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00653
00654 CVertexBuffer &vb= <a class="code" href="classNL3D_1_1CDriverUser.html#n15">_VBColorUv</a>;
00655 CPrimitiveBlock &pb= <a class="code" href="classNL3D_1_1CDriverUser.html#n18">_PBQuad</a>;
00656
00657 vb.setVertexCoord (0, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m0">V0</a>);
00658 vb.setVertexCoord (1, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m1">V1</a>);
00659 vb.setVertexCoord (2, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m2">V2</a>);
00660 vb.setVertexCoord (3, shp.<a class="code" href="classNLMISC_1_1CQuad.html#m3">V3</a>);
00661 vb.setColor(0, shp.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m0">Color0</a>);
00662 vb.setColor(1, shp.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m1">Color1</a>);
00663 vb.setColor(2, shp.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m2">Color2</a>);
00664 vb.setColor(3, shp.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m3">Color3</a>);
00665 vb.setTexCoord (0, 0, shp.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m4">Uv0</a>);
00666 vb.setTexCoord (1, 0, shp.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m5">Uv1</a>);
00667 vb.setTexCoord (2, 0, shp.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m6">Uv2</a>);
00668 vb.setTexCoord (3, 0, shp.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m7">Uv3</a>);
00669
00670 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activeVertexBuffer(vb);
00671 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->render(pb, <a class="code" href="classNL3D_1_1CDriverUser.html#b1">convMat</a>(mat));
00672 }
00673 <font class="comment">// ***************************************************************************</font>
<a name="l00674"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_12">00674</a> <font class="keywordtype">void</font> CDriverUser::drawQuads(<font class="keyword">const</font> std::vector<NLMISC::CQuadColorUV> &<a class="code" href="driver__opengl__extension__def_8h.html#a386">q</a>, UMaterial &mat)
00675 {
00676 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00677
00678 <font class="keyword">const</font> CQuadColorUV *qptr = &(<a class="code" href="driver__opengl__extension__def_8h.html#a386">q</a>[0]);
00679 <a class="code" href="classNL3D_1_1CDriverUser.html#z443_12">drawQuads</a>(qptr , <a class="code" href="driver__opengl__extension__def_8h.html#a386">q</a>.size(), mat);
00680 }
00681
00682 <font class="comment">// ***************************************************************************</font>
<a name="l00683"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z443_13">00683</a> <font class="keywordtype">void</font> CDriverUser::drawQuads(<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CQuadColorUV.html">NLMISC::CQuadColorUV</a> *quads, uint32 nbQuads, UMaterial &mat)
00684 {
00685 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00686 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00687
00688 CVertexBuffer &vb = <a class="code" href="classNL3D_1_1CDriverUser.html#n19">_VBQuadsColUv</a>;
00689
00690 vb.setNumVertices (4*nbQuads);
00691
00692 <font class="keywordflow">for</font> (uint32 i = 0; i < nbQuads; ++i)
00693 {
00694 <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CQuadColorUV.html">NLMISC::CQuadColorUV</a> &qcuv = quads[i];
00695 vb.setVertexCoord (i*4+0, qcuv.<a class="code" href="classNLMISC_1_1CQuad.html#m0">V0</a>);
00696 vb.setVertexCoord (i*4+1, qcuv.<a class="code" href="classNLMISC_1_1CQuad.html#m1">V1</a>);
00697 vb.setVertexCoord (i*4+2, qcuv.<a class="code" href="classNLMISC_1_1CQuad.html#m2">V2</a>);
00698 vb.setVertexCoord (i*4+3, qcuv.<a class="code" href="classNLMISC_1_1CQuad.html#m3">V3</a>);
00699 vb.setColor(i*4+0, qcuv.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m0">Color0</a>);
00700 vb.setColor(i*4+1, qcuv.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m1">Color1</a>);
00701 vb.setColor(i*4+2, qcuv.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m2">Color2</a>);
00702 vb.setColor(i*4+3, qcuv.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m3">Color3</a>);
00703 vb.setTexCoord (i*4+0, 0, qcuv.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m4">Uv0</a>);
00704 vb.setTexCoord (i*4+1, 0, qcuv.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m5">Uv1</a>);
00705 vb.setTexCoord (i*4+2, 0, qcuv.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m6">Uv2</a>);
00706 vb.setTexCoord (i*4+3, 0, qcuv.<a class="code" href="classNLMISC_1_1CQuadColorUV.html#m7">Uv3</a>);
00707 }
00708
00709 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->activeVertexBuffer(vb);
00710 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->renderQuads(<a class="code" href="classNL3D_1_1CDriverUser.html#b1">convMat</a>(mat), 0, nbQuads);
00711 }
00712
00713
00714 <font class="comment">// ***************************************************************************</font>
00715 <font class="comment">// ***************************************************************************</font>
00716 <font class="comment">// 2D TOOLS.</font>
00717 <font class="comment">// ***************************************************************************</font>
00718 <font class="comment">// ***************************************************************************</font>
00719
00720
00721 <font class="comment">// ***************************************************************************</font>
<a name="l00722"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z444_0">00722</a> <font class="keywordtype">void</font> CDriverUser::drawBitmap (<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a365">y</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>, <font class="keyword">class</font> UTexture& texture, <font class="keywordtype">bool</font> <a class="code" href="namespaceNLMISC.html#a286">blend</a>, CRGBA col)
00723 {
00724 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00725 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00726
00727 <a class="code" href="classNL3D_1_1CDriverUser.html#n21">_MatText</a>.setTexture(&texture);
00728 <a class="code" href="classNL3D_1_1CDriverUser.html#n21">_MatText</a>.setColor(col);
00729 <a class="code" href="classNL3D_1_1CDriverUser.html#n21">_MatText</a>.setBlend(<a class="code" href="namespaceNLMISC.html#a286">blend</a>);
00730
00731 CQuadUV quad;
00732 quad.V0.set(<a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a>,<a class="code" href="driver__opengl__extension__def_8h.html#a365">y</a>,0);
00733 quad.V1.set(<a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a>+<a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>,<a class="code" href="driver__opengl__extension__def_8h.html#a365">y</a>,0);
00734 quad.V2.set(<a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a>+<a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>,<a class="code" href="driver__opengl__extension__def_8h.html#a365">y</a>+<a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>,0);
00735 quad.V3.set(<a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a>,<a class="code" href="driver__opengl__extension__def_8h.html#a365">y</a>+<a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>,0);
00736 quad.Uv0.U= 0.f;
00737 quad.Uv0.V= 1.f;
00738 quad.Uv1.U= 1.f;
00739 quad.Uv1.V= 1.f;
00740 quad.Uv2.U= 1.f;
00741 quad.Uv2.V= 0.f;
00742 quad.Uv3.U= 0.f;
00743 quad.Uv3.V= 0.f;
00744
00745 <a class="code" href="classNL3D_1_1CDriverUser.html#z443_8">drawQuad</a>(quad, <a class="code" href="classNL3D_1_1CDriverUser.html#n21">_MatText</a>);
00746 }
00747 <font class="comment">// ***************************************************************************</font>
<a name="l00748"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z444_1">00748</a> <font class="keywordtype">void</font> CDriverUser::drawLine (<font class="keywordtype">float</font> x0, <font class="keywordtype">float</font> y0, <font class="keywordtype">float</font> x1, <font class="keywordtype">float</font> y1, CRGBA col)
00749 {
00750 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00751 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00752
00753 <a class="code" href="classNL3D_1_1CDriverUser.html#n20">_MatFlat</a>.setColor(col);
00754 <a class="code" href="classNL3D_1_1CDriverUser.html#n20">_MatFlat</a>.setBlend(<font class="keyword">true</font>);
00755
00756 CLine line;
00757 line.V0.set(x0,y0,0);
00758 line.V1.set(x1,y1,0);
00759
00760 <a class="code" href="classNL3D_1_1CDriverUser.html#z443_0">drawLine</a>(line, <a class="code" href="classNL3D_1_1CDriverUser.html#n20">_MatFlat</a>);
00761 }
00762 <font class="comment">// ***************************************************************************</font>
<a name="l00763"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z444_2">00763</a> <font class="keywordtype">void</font> CDriverUser::drawTriangle (<font class="keywordtype">float</font> x0, <font class="keywordtype">float</font> y0, <font class="keywordtype">float</font> x1, <font class="keywordtype">float</font> y1, <font class="keywordtype">float</font> x2, <font class="keywordtype">float</font> y2, CRGBA col)
00764 {
00765 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00766 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00767
00768 <a class="code" href="classNL3D_1_1CDriverUser.html#n20">_MatFlat</a>.setColor(col);
00769 <a class="code" href="classNL3D_1_1CDriverUser.html#n20">_MatFlat</a>.setBlend(<font class="keyword">true</font>);
00770
00771 CTriangle tri;
00772 tri.V0.set(x0,y0,0);
00773 tri.V1.set(x1,y1,0);
00774 tri.V2.set(x2,y2,0);
00775
00776 <a class="code" href="classNL3D_1_1CDriverUser.html#z443_4">drawTriangle</a>(tri, <a class="code" href="classNL3D_1_1CDriverUser.html#n20">_MatFlat</a>);
00777 }
00778 <font class="comment">// ***************************************************************************</font>
<a name="l00779"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z444_3">00779</a> <font class="keywordtype">void</font> CDriverUser::drawQuad (<font class="keywordtype">float</font> x0, <font class="keywordtype">float</font> y0, <font class="keywordtype">float</font> x1, <font class="keywordtype">float</font> y1, CRGBA col)
00780 {
00781 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00782 <a class="code" href="driver__user_8cpp.html#a3">NL3D_HAUTO_DRAW_DRIVER</a>;
00783
00784 <a class="code" href="classNL3D_1_1CDriverUser.html#n20">_MatFlat</a>.setColor(col);
00785 <a class="code" href="classNL3D_1_1CDriverUser.html#n20">_MatFlat</a>.setBlend(<font class="keyword">true</font>);
00786
00787 CQuad quad;
00788 quad.V0.set(x0,y0,0);
00789 quad.V1.set(x1,y0,0);
00790 quad.V2.set(x1,y1,0);
00791 quad.V3.set(x0,y1,0);
00792
00793 <a class="code" href="classNL3D_1_1CDriverUser.html#z443_8">drawQuad</a>(quad, <a class="code" href="classNL3D_1_1CDriverUser.html#n20">_MatFlat</a>);
00794 }
00795 <font class="comment">// ***************************************************************************</font>
<a name="l00796"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z444_4">00796</a> <font class="keywordtype">void</font> CDriverUser::drawQuad (<font class="keywordtype">float</font> xcenter, <font class="keywordtype">float</font> ycenter, <font class="keywordtype">float</font> radius, CRGBA col)
00797 {
00798 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00799
00800 <a class="code" href="classNL3D_1_1CDriverUser.html#z443_8">drawQuad</a>(xcenter-radius, ycenter-radius, xcenter+radius, ycenter+radius, col);
00801 }
00802 <font class="comment">// ***************************************************************************</font>
<a name="l00803"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z444_5">00803</a> <font class="keywordtype">void</font> CDriverUser::drawWiredQuad (<font class="keywordtype">float</font> x0, <font class="keywordtype">float</font> y0, <font class="keywordtype">float</font> x1, <font class="keywordtype">float</font> y1, CRGBA col)
00804 {
00805 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00806
00807 <font class="comment">// v-left</font>
00808 <a class="code" href="classNL3D_1_1CDriverUser.html#z443_0">drawLine</a>(x0,y0,x0,y1,col);
00809 <font class="comment">// v-right</font>
00810 <a class="code" href="classNL3D_1_1CDriverUser.html#z443_0">drawLine</a>(x1,y0,x1,y1,col);
00811 <font class="comment">// h-up</font>
00812 <a class="code" href="classNL3D_1_1CDriverUser.html#z443_0">drawLine</a>(x0,y1,x1,y1,col);
00813 <font class="comment">// h-bottom</font>
00814 <a class="code" href="classNL3D_1_1CDriverUser.html#z443_0">drawLine</a>(x0,y0,x1,y0,col);
00815 }
00816 <font class="comment">// ***************************************************************************</font>
<a name="l00817"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z444_6">00817</a> <font class="keywordtype">void</font> CDriverUser::drawWiredQuad (<font class="keywordtype">float</font> xcenter, <font class="keywordtype">float</font> ycenter, <font class="keywordtype">float</font> radius, CRGBA col)
00818 {
00819 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00820
00821 <a class="code" href="classNL3D_1_1CDriverUser.html#z444_5">drawWiredQuad</a>(xcenter-radius, ycenter-radius, xcenter+radius, ycenter+radius, col);
00822 }
00823
00824
00825 <font class="comment">// ***************************************************************************</font>
00826 <font class="comment">// ***************************************************************************</font>
00827 <font class="comment">// MISC.</font>
00828 <font class="comment">// ***************************************************************************</font>
00829 <font class="comment">// ***************************************************************************</font>
00830
00831
00832 <font class="comment">// ***************************************************************************</font>
<a name="l00833"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z447_0">00833</a> UDriver::TMessageBoxId CDriverUser::systemMessageBox (<font class="keyword">const</font> <font class="keywordtype">char</font>* message, <font class="keyword">const</font> <font class="keywordtype">char</font>* title, TMessageBoxType <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>, TMessageBoxIcon icon)
00834 {
00835 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00836
00837 IDriver::TMessageBoxId dret;
00838 IDriver::TMessageBoxType dtype= (IDriver::TMessageBoxType)(uint32)<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>;
00839 IDriver::TMessageBoxIcon dicon= (IDriver::TMessageBoxIcon)(uint32)icon;
00840 dret= <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->systemMessageBox (message, title, dtype, dicon);
00841
00842 <font class="keywordflow">return</font> (UDriver::TMessageBoxId)(uint32)dret;
00843 }
00844
00845
00846 <font class="comment">// ***************************************************************************</font>
<a name="l00847"></a><a class="code" href="classNL3D_1_1CDriverUser.html#b1">00847</a> CMaterial &CDriverUser::convMat(UMaterial &mat)
00848 {
00849 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00850
00851 CMaterialUser *pmat= (CMaterialUser*)&mat;
00852 <font class="keywordflow">return</font> pmat->_Material;
00853 }
00854
00855
00856 <font class="comment">// ***************************************************************************</font>
<a name="l00857"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z437_0">00857</a> <font class="keywordtype">void</font> CDriverUser::clearRGBABuffer(CRGBA col)
00858 {
00859 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00860 <a class="code" href="driver__user_8cpp.html#a1">NL3D_HAUTO_CLEAR_DRIVER</a>;
00861
00862 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->clear2D(col);
00863 }
00864 <font class="comment">// ***************************************************************************</font>
<a name="l00865"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z437_1">00865</a> <font class="keywordtype">void</font> CDriverUser::clearZBuffer()
00866 {
00867 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00868 <a class="code" href="driver__user_8cpp.html#a1">NL3D_HAUTO_CLEAR_DRIVER</a>;
00869
00870 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->clearZBuffer();
00871 }
00872 <font class="comment">// ***************************************************************************</font>
<a name="l00873"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z437_2">00873</a> <font class="keywordtype">void</font> CDriverUser::clearBuffers(CRGBA col)
00874 {
00875 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00876 <a class="code" href="driver__user_8cpp.html#a1">NL3D_HAUTO_CLEAR_DRIVER</a>;
00877
00878 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->clear2D(col);
00879 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->clearZBuffer();
00880 }
00881 <font class="comment">// ***************************************************************************</font>
<a name="l00882"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z437_3">00882</a> <font class="keywordtype">void</font> CDriverUser::swapBuffers()
00883 {
00884 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00885 <a class="code" href="driver__user_8cpp.html#a2">NL3D_HAUTO_SWAP_DRIVER</a>;
00886
00887 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->swapBuffers();
00888 }
00889
00890
00891 <font class="comment">// ***************************************************************************</font>
<a name="l00892"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z438_0">00892</a> <font class="keywordtype">bool</font> CDriverUser::fogEnabled()
00893 {
00894 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00895 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00896
00897 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->fogEnabled();
00898 }
00899 <font class="comment">// ***************************************************************************</font>
<a name="l00900"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z438_1">00900</a> <font class="keywordtype">void</font> CDriverUser::enableFog(<font class="keywordtype">bool</font> enable)
00901 {
00902 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00903 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00904
00905 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->enableFog(enable);
00906 }
00907 <font class="comment">// ***************************************************************************</font>
<a name="l00908"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z438_2">00908</a> <font class="keywordtype">void</font> CDriverUser::setupFog(<font class="keywordtype">float</font> start, <font class="keywordtype">float</font> end, CRGBA color)
00909 {
00910 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00911 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00912
00913 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->setupFog(start, end, color);
00914 }
00915
00916
00917 <font class="comment">// ***************************************************************************</font>
<a name="l00918"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z439_0">00918</a> <font class="keywordtype">void</font> CDriverUser::setLight (uint8 <a class="code" href="driver__opengl__extension__def_8h.html#a410">num</a>, <font class="keyword">const</font> ULight& light)
00919 {
00920 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00921 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00922
00923 CLightUser *plight= (CLightUser*)&light;
00924 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->setLight (<a class="code" href="driver__opengl__extension__def_8h.html#a410">num</a>, plight->_Light);
00925 }
00926 <font class="comment">// ***************************************************************************</font>
<a name="l00927"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z439_1">00927</a> <font class="keywordtype">void</font> CDriverUser::enableLight (uint8 <a class="code" href="driver__opengl__extension__def_8h.html#a410">num</a>, <font class="keywordtype">bool</font> enable)
00928 {
00929 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00930 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00931
00932 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->enableLight (<a class="code" href="driver__opengl__extension__def_8h.html#a410">num</a>, enable);
00933 }
00934 <font class="comment">// ***************************************************************************</font>
<a name="l00935"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z439_2">00935</a> <font class="keywordtype">void</font> CDriverUser::setAmbientColor (CRGBA color)
00936 {
00937 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00938 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00939
00940 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->setAmbientColor (color);
00941 }
00942
00943
00944 <font class="comment">// ***************************************************************************</font>
<a name="l00945"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z447_1">00945</a> <font class="keywordtype">void</font> CDriverUser::setPolygonMode (TPolygonMode mode)
00946 {
00947 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00948 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00949
00950 IDriver::TPolygonMode dmode=IDriver::Filled;
00951 <font class="keywordflow">switch</font>(mode)
00952 {
00953 <font class="keywordflow">case</font> <a class="code" href="classNL3D_1_1UDriver.html#s32s26">Filled</a>: dmode= IDriver::Filled; <font class="keywordflow">break</font>;
00954 <font class="keywordflow">case</font> <a class="code" href="classNL3D_1_1UDriver.html#s32s27">Line</a>: dmode= IDriver::Line; <font class="keywordflow">break</font>;
00955 <font class="keywordflow">case</font> <a class="code" href="classNL3D_1_1UDriver.html#s32s28">Point</a>: dmode= IDriver::Point; <font class="keywordflow">break</font>;
00956 <font class="keywordflow">default</font>: <a class="code" href="debug_8h.html#a12">nlstop</a>;
00957 };
00958 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->setPolygonMode (dmode);
00959 }
<a name="l00960"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z447_2">00960</a> U3dMouseListener* CDriverUser::create3dMouseListener ()
00961 {
00962 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00963 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00964
00965 <font class="comment">// Alloc the listener</font>
00966 CEvent3dMouseListener *listener=<font class="keyword">new</font> CEvent3dMouseListener();
00967
00968 <font class="comment">// register it</font>
00969 listener->addToServer (<a class="code" href="classNL3D_1_1UDriver.html#m0">EventServer</a>);
00970
00971 <font class="keywordflow">return</font> listener;
00972 }
<a name="l00973"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z447_3">00973</a> <font class="keywordtype">void</font> CDriverUser::delete3dMouseListener (U3dMouseListener *listener)
00974 {
00975 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00976 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00977
00978 <font class="comment">// Unregister</font>
00979 ((CEvent3dMouseListener*)listener)->removeFromServer (<a class="code" href="classNL3D_1_1UDriver.html#m0">EventServer</a>);
00980
00981 <font class="keyword">delete</font> (CEvent3dMouseListener*)listener;
00982 }
<a name="l00983"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z447_4">00983</a> UDriver::TPolygonMode CDriverUser::getPolygonMode ()
00984 {
00985 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
00986 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
00987
00988 IDriver::TPolygonMode dmode;
00989 UDriver::TPolygonMode umode=UDriver::Filled;
00990 dmode= <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getPolygonMode();
00991 <font class="keywordflow">switch</font>(dmode)
00992 {
00993 <font class="keywordflow">case</font> IDriver::Filled: umode= UDriver::Filled; <font class="keywordflow">break</font>;
00994 <font class="keywordflow">case</font> IDriver::Line: umode= UDriver::Line; <font class="keywordflow">break</font>;
00995 <font class="keywordflow">case</font> IDriver::Point: umode= UDriver::Point; <font class="keywordflow">break</font>;
00996 <font class="keywordflow">default</font>: <a class="code" href="debug_8h.html#a12">nlstop</a>;
00997 };
00998
00999 <font class="keywordflow">return</font> umode;
01000 }
<a name="l01001"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z447_5">01001</a> <font class="keywordtype">void</font> CDriverUser::forceDXTCCompression(<font class="keywordtype">bool</font> dxtcComp)
01002 {
01003 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01004 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01005
01006 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->forceDXTCCompression(dxtcComp);
01007 }
<a name="l01008"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z447_6">01008</a> <font class="keywordtype">void</font> CDriverUser::forceTextureResize(uint divisor)
01009 {
01010 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01011 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01012
01013 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->forceTextureResize(divisor);
01014 }
<a name="l01015"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z447_7">01015</a> <font class="keywordtype">bool</font> CDriverUser::setMonitorColorProperties (<font class="keyword">const</font> CMonitorColorProperties &properties)
01016 {
01017 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01018 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01019
01020 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->setMonitorColorProperties (properties);
01021 }
01022
01023
01024
01025 <font class="comment">// ***************************************************************************</font>
01026 <font class="comment">// ***************************************************************************</font>
01028 <font class="comment">// ***************************************************************************</font>
01029 <font class="comment">// ***************************************************************************</font>
01030
<a name="l01031"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z445_0">01031</a> uint32 CDriverUser::getImplementationVersion ()<font class="keyword"> const</font>
01032 <font class="keyword"></font>{
01033 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01034 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01035
01036 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getImplementationVersion ();
01037 }
<a name="l01038"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z445_1">01038</a> <font class="keyword">const</font> <font class="keywordtype">char</font>* CDriverUser::getDriverInformation ()
01039 {
01040 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01041 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01042
01043 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getDriverInformation();
01044 }
<a name="l01045"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z445_2">01045</a> <font class="keyword">const</font> <font class="keywordtype">char</font>* CDriverUser::getVideocardInformation ()
01046 {
01047 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01048 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01049
01050 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getVideocardInformation ();
01051 }
<a name="l01052"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z445_3">01052</a> sint CDriverUser::getNbTextureStages()
01053 {
01054 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01055 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01056
01057 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getNbTextureStages();
01058 }
<a name="l01059"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z445_4">01059</a> <font class="keywordtype">void</font> CDriverUser::getWindowSize (uint32 &<a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>, uint32 &<a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>)
01060 {
01061 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01062 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01063
01064 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getWindowSize (<a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>, <a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>);
01065 }
<a name="l01066"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z445_5">01066</a> uint CDriverUser::getWindowWidth ()
01067 {
01068 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01069 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01070
01071 uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>, <a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>;
01072 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getWindowSize (<a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>, <a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>);
01073 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>;
01074 }
<a name="l01075"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z445_6">01075</a> uint CDriverUser::getWindowHeight ()
01076 {
01077 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01078 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01079
01080 uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>, <a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>;
01081 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getWindowSize (<a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>, <a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>);
01082 <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>;
01083 }
<a name="l01084"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z445_7">01084</a> <font class="keywordtype">void</font> CDriverUser::getBuffer (CBitmap &bitmap)
01085 {
01086 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01087 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01088
01089 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getBuffer (bitmap) ;
01090 }
<a name="l01091"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z445_8">01091</a> <font class="keywordtype">void</font> CDriverUser::getZBuffer (std::vector<float> &zbuffer)
01092 {
01093 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01094 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01095
01096 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getZBuffer (zbuffer) ;
01097 }
<a name="l01098"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z445_9">01098</a> <font class="keywordtype">void</font> CDriverUser::getBufferPart (CBitmap &bitmap, <a class="code" href="classNLMISC_1_1CRect.html">NLMISC::CRect</a> &rect)
01099 {
01100 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01101 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01102
01103 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getBufferPart (bitmap, rect) ;
01104 }
<a name="l01105"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z445_10">01105</a> <font class="keywordtype">void</font> CDriverUser::getZBufferPart (std::vector<float> &zbuffer, <a class="code" href="classNLMISC_1_1CRect.html">NLMISC::CRect</a> &rect)
01106 {
01107 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01108 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01109
01110 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getZBufferPart (zbuffer, rect) ;
01111 }
<a name="l01112"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z445_11">01112</a> <font class="keywordtype">bool</font> CDriverUser::fillBuffer (CBitmap &bitmap)
01113 {
01114 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01115 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01116
01117 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->fillBuffer(bitmap);
01118 }
01119
01120
01121 <font class="comment">// ***************************************************************************</font>
01122 <font class="comment">// ***************************************************************************</font>
01123 <font class="comment">// Mouse / Keyboards / Game devices</font>
01124 <font class="comment">// ***************************************************************************</font>
01125 <font class="comment">// ***************************************************************************</font>
01126
<a name="l01127"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z446_0">01127</a> <a class="code" href="structNLMISC_1_1IMouseDevice.html">NLMISC::IMouseDevice</a> *CDriverUser::enableLowLevelMouse(<font class="keywordtype">bool</font> enable)
01128 {
01129 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01130 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01131
01132 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->enableLowLevelMouse(enable);
01133 }
<a name="l01134"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z446_1">01134</a> <a class="code" href="structNLMISC_1_1IKeyboardDevice.html">NLMISC::IKeyboardDevice</a> *CDriverUser::enableLowLevelKeyboard(<font class="keywordtype">bool</font> enable)
01135 {
01136 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01137 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01138
01139 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->enableLowLevelKeyboard(enable);
01140 }
<a name="l01141"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z446_2">01141</a> <a class="code" href="structNLMISC_1_1IInputDeviceManager.html">NLMISC::IInputDeviceManager</a> *CDriverUser::getLowLevelInputDeviceManager()
01142 {
01143 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01144 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01145
01146 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->getLowLevelInputDeviceManager();
01147 }
<a name="l01148"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z446_3">01148</a> <font class="keywordtype">void</font> CDriverUser::showCursor (<font class="keywordtype">bool</font> b)
01149 {
01150 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01151 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01152
01153 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->showCursor(b);
01154 }
<a name="l01155"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z446_4">01155</a> <font class="keywordtype">void</font> CDriverUser::setMousePos (<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a365">y</a>)
01156 {
01157 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01158 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01159
01160 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->setMousePos (<a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a>, <a class="code" href="driver__opengl__extension__def_8h.html#a365">y</a>);
01161 }
<a name="l01162"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z446_5">01162</a> <font class="keywordtype">void</font> CDriverUser::setCapture (<font class="keywordtype">bool</font> b)
01163 {
01164 <a class="code" href="driver__user_8h.html#a0">NL3D_MEM_DRIVER</a>
01165 <a class="code" href="driver__user_8cpp.html#a0">NL3D_HAUTO_UI_DRIVER</a>;
01166
01167 <a class="code" href="classNL3D_1_1CDriverUser.html#n0">_Driver</a>->setCapture (b);
01168 }
01169
01170
01171 <font class="comment">// ***************************************************************************</font>
01172 <font class="comment">// ***************************************************************************</font>
01173 <font class="comment">// Async Texture loading mgt</font>
01174 <font class="comment">// ***************************************************************************</font>
01175 <font class="comment">// ***************************************************************************</font>
01176
01177
01178 <font class="comment">// ***************************************************************************</font>
<a name="l01179"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z450_0">01179</a> <font class="keywordtype">void</font> CDriverUser::setupAsyncTextureLod(uint baseLevel, uint maxLevel)
01180 {
01181 <a class="code" href="classNL3D_1_1CDriverUser.html#n10">_AsyncTextureManager</a>.setupLod(baseLevel, maxLevel);
01182 }
01183 <font class="comment">// ***************************************************************************</font>
<a name="l01184"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z450_1">01184</a> <font class="keywordtype">void</font> CDriverUser::setupAsyncTextureMaxUploadPerFrame(uint maxup)
01185 {
01186 <a class="code" href="classNL3D_1_1CDriverUser.html#n10">_AsyncTextureManager</a>.setupMaxUploadPerFrame(maxup);
01187 }
01188 <font class="comment">// ***************************************************************************</font>
<a name="l01189"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z450_4">01189</a> <font class="keywordtype">void</font> CDriverUser::updateAsyncTexture()
01190 {
01191 <a class="code" href="classNL3D_1_1CDriverUser.html#n10">_AsyncTextureManager</a>.update(<a class="code" href="classNL3D_1_1CDriverUser.html#z451_0">getDriver</a>());
01192 }
01193
01194
01195 <font class="comment">// ***************************************************************************</font>
<a name="l01196"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z450_2">01196</a> <font class="keywordtype">void</font> CDriverUser::setupMaxTotalAsyncTextureSize(uint maxText)
01197 {
01198 <a class="code" href="classNL3D_1_1CDriverUser.html#n10">_AsyncTextureManager</a>.setupMaxTotalTextureSize(maxText);
01199 }
01200 <font class="comment">// ***************************************************************************</font>
<a name="l01201"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z450_5">01201</a> uint CDriverUser::getTotalAsyncTextureSizeAsked()<font class="keyword"> const</font>
01202 <font class="keyword"></font>{
01203 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n10">_AsyncTextureManager</a>.getTotalTextureSizeAsked();
01204 }
01205 <font class="comment">// ***************************************************************************</font>
<a name="l01206"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z450_6">01206</a> uint CDriverUser::getLastAsyncTextureSizeGot()<font class="keyword"> const</font>
01207 <font class="keyword"></font>{
01208 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverUser.html#n10">_AsyncTextureManager</a>.getLastTextureSizeGot();
01209 }
01210
01211 <font class="comment">// ***************************************************************************</font>
<a name="l01212"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z450_3">01212</a> <font class="keywordtype">void</font> CDriverUser::setupMaxHLSColoringPerFrame(uint maxCol)
01213 {
01214 <a class="code" href="classNL3D_1_1CDriverUser.html#n10">_AsyncTextureManager</a>.setupMaxHLSColoringPerFrame(maxCol);
01215 }
01216
01217 <font class="comment">// ***************************************************************************</font>
<a name="l01218"></a><a class="code" href="classNL3D_1_1CDriverUser.html#z450_7">01218</a> <font class="keywordtype">void</font> CDriverUser::loadHLSBank(<font class="keyword">const</font> std::string &fileName)
01219 {
01220 <font class="comment">// load it.</font>
01221 CHLSTextureBank *hlsBank= <font class="keyword">new</font> CHLSTextureBank;
01222 <font class="keywordflow">try</font>
01223 {
01224 std::string path= CPath::lookup(fileName);
01225 CIFile fIn;
01226 <font class="keywordflow">if</font>(!fIn.open(path))
01227 <font class="keywordflow">throw</font> EPathNotFound(path);
01228 fIn.serial(*hlsBank);
01229 }
01230 <font class="keywordflow">catch</font>(Exception &)
01231 {
01232 <font class="keyword">delete</font> hlsBank;
01233 <font class="keywordflow">throw</font>;
01234 }
01235
01236 <font class="comment">// add it to the manager.</font>
01237 <a class="code" href="classNL3D_1_1CDriverUser.html#n10">_AsyncTextureManager</a>.HLSManager.addBank(hlsBank);
01238 }
01239
01240
01241 } <font class="comment">// NL3D</font>
</pre></div>
<!-- footer -->
<BR><FONT Size=+5> </FONT>
</TD>
<TD WIDTH=15><IMG SRC=/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
</TR>
</TABLE>
</BODY>
</HTML>
|