aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/driver__opengl_8h-source.html
blob: 2eb009b392c8182430bd88ff3904daaafd432586 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
	<TITLE>nevrax.org : docs</TITLE>
	<LINK REL=stylesheet TYPE="text/css" HREF="/inc/css/nevrax.css">
	<link href="doxygen.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY MARGINHEIGHT="0" MARGINWIDTH="0">

<!-- uplinks -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0>
 <TR>
        <TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=140 BGCOLOR=#dddddd><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD><IMG width=6 height=14 SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF='/'><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
        <TD><IMG  width=6 height=14  SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF='/'><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
 </TR>
</TABLE> 

<!-- banner Nevrax -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0 WIDTH=100%>
 <TR><TD  BGCOLOR="#000000" BACKGROUND="/inc/img/black_banner.jpg"><A HREF=""><IMG  SRC="/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
</TABLE>

<!-- main table -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0 height=100%>
 <TR>
	<TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
	<TD WIDTH=140   BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">

		<!------ Begin Box ------>
		<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0  cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
		<FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td  colspan=2 bgcolor=#FFFFFF>
		<TABLE cellspacing=0 cellpadding=1 border=0>
			<tr><td ALIGN=middle><a  class='linkbox' href="/news/" TITLE="Rubrique news"><img width=13 height=15  hspace=5 border=0 src=/inc/img/picto-news.gif ALT=#></A></td><td><a  class='linkbox' href="/news/" TITLE="News">News</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/mail/" TITLE="Rubrique mail"><img width=15 height=11  hspace=5 border=0 src=/inc/img/picto-mail.gif ALT=#></A></td><td><a  class='linkbox' href="/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/docs/" TITLE="Rubrique docs"><img width=14 height=16  hspace=5 border=0 src=/inc/img/picto-docs.gif ALT=#></A></td><td><a  class='linkbox' href="/docs/" TITLE="Documentation">Documentation</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/cvs/" TITLE="Rubrique cvs"><img width=13 height=17  hspace=5 border=0 src=/inc/img/picto-cvs.gif ALT=#></A></td><td><a  class='linkbox' href="/cvs/" TITLE="CVS Web">CVS</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/bugs/" TITLE="Rubrique bugs"><img width=20 height=16  hspace=5 border=0 src=/inc/img/picto-bugs.gif ALT=#></A></td><td><a  class='linkbox' href="/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/GPL.php3" TITLE="Rubrique license"><img  width=18 height=12   hspace=5 border=0 src=/inc/img/picto-gpl.gif ALT=#></A></td><td><a  class='linkbox' href="/GPL.php3" TITLE="License">License</a></td></tr>
		</TABLE>
		</TD></TR></TABLE></TD></TR></TABLE>
		<!------ End Box  ------>

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

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

<!-- block -->
<TABLE  bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0  BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="/inc/img/reddots.gif"></TD>
	<TD><B>Documentation</B></TD>
	<TD ALIGN=RIGHT>&nbsp;</td>
</tr></table>
<!-- Generated by Doxygen 1.2.14 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindexRef" doxygen="_cgi:/cgi-bin/nel-search.cgi" href="/cgi-bin/nel-search.cgi">Search</a> &nbsp; </center>
<hr><h1>driver_opengl.h</h1><a href="driver__opengl_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 
00007 <font class="comment">/* Copyright, 2000 Nevrax Ltd.</font>
00008 <font class="comment"> *</font>
00009 <font class="comment"> * This file is part of NEVRAX NEL.</font>
00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font>
00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font>
00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font>
00013 <font class="comment"> * any later version.</font>
00014 <font class="comment"></font>
00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font>
00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
00018 <font class="comment"> * General Public License for more details.</font>
00019 <font class="comment"></font>
00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font>
00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font>
00023 <font class="comment"> * MA 02111-1307, USA.</font>
00024 <font class="comment"> */</font>
00025 
00026 <font class="preprocessor">#ifndef NL_OPENGL_H</font>
00027 <font class="preprocessor"></font><font class="preprocessor">#define NL_OPENGL_H</font>
00028 <font class="preprocessor"></font>
00029 
00030 <font class="preprocessor">#include "<a class="code" href="types__nl_8h.html">nel/misc/types_nl.h</a>"</font>
00031 
00032 <font class="preprocessor">#ifdef NL_OS_WINDOWS</font>
00033 <font class="preprocessor"></font>
00034 <font class="preprocessor">#define WIN32_LEAN_AND_MEAN</font>
00035 <font class="preprocessor"></font><font class="preprocessor">#include &lt;windows.h&gt;</font>
00036 <font class="preprocessor">#  ifdef min</font>
00037 <font class="preprocessor"></font><font class="preprocessor">#    undef min</font>
00038 <font class="preprocessor"></font><font class="preprocessor">#  endif</font>
00039 <font class="preprocessor"></font><font class="preprocessor">#  ifdef max</font>
00040 <font class="preprocessor"></font><font class="preprocessor">#    undef max</font>
00041 <font class="preprocessor"></font><font class="preprocessor">#  endif</font>
00042 <font class="preprocessor"></font>
00043 <font class="preprocessor">#else // NL_OS_UNIX</font>
00044 <font class="preprocessor"></font>
<a name="l00045"></a><a class="code" href="driver__opengl_8h.html#a0">00045</a> <font class="preprocessor">#define GLX_GLXEXT_PROTOTYPES</font>
00046 <font class="preprocessor"></font>
00047 <font class="preprocessor">#include &lt;GL/glx.h&gt;</font>
00048 
00049 <font class="preprocessor">#ifdef XF86VIDMODE</font>
00050 <font class="preprocessor"></font><font class="preprocessor">#include &lt;X11/extensions/xf86vmode.h&gt;</font>
00051 <font class="preprocessor">#endif //XF86VIDMODE</font>
00052 <font class="preprocessor"></font>
00053 <font class="preprocessor">#endif // NL_OS_UNIX</font>
00054 <font class="preprocessor"></font>
00055 <font class="preprocessor">#include &lt;GL/gl.h&gt;</font>
00056 <font class="preprocessor">#include "<a class="code" href="driver__opengl__extension_8h.html">driver_opengl_extension.h</a>"</font>
00057 
00058 <font class="preprocessor">#include "<a class="code" href="driver_8h.html">3d/driver.h</a>"</font>
00059 <font class="preprocessor">#include "<a class="code" href="material_8h.html">3d/material.h</a>"</font>
00060 <font class="preprocessor">#include "<a class="code" href="shader_8h.html">3d/shader.h</a>"</font>
00061 <font class="preprocessor">#include "<a class="code" href="vertex__buffer_8h.html">3d/vertex_buffer.h</a>"</font>
00062 <font class="preprocessor">#include "<a class="code" href="matrix_8h.html">nel/misc/matrix.h</a>"</font>
00063 <font class="preprocessor">#include "<a class="code" href="smart__ptr_8h.html">nel/misc/smart_ptr.h</a>"</font>
00064 <font class="preprocessor">#include "<a class="code" href="rgba_8h.html">nel/misc/rgba.h</a>"</font>
00065 <font class="preprocessor">#include "<a class="code" href="event__emitter_8h.html">nel/misc/event_emitter.h</a>"</font>
00066 <font class="preprocessor">#include "<a class="code" href="bit__set_8h.html">nel/misc/bit_set.h</a>"</font>
00067 <font class="preprocessor">#include "<a class="code" href="ptr__set_8h.html">3d/ptr_set.h</a>"</font>
00068 <font class="preprocessor">#include "<a class="code" href="heap__memory_8h.html">nel/misc/heap_memory.h</a>"</font>
00069 <font class="preprocessor">#include "<a class="code" href="event__emitter__multi_8h.html">nel/misc/event_emitter_multi.h</a>"</font>
00070 <font class="preprocessor">#include "<a class="code" href="driver__opengl__states_8h.html">driver_opengl_states.h</a>"</font>
00071 <font class="preprocessor">#include "<a class="code" href="texture__cube_8h.html">3d/texture_cube.h</a>"</font>
00072 <font class="preprocessor">#include "<a class="code" href="vertex__program__parse_8h.html">3d/vertex_program_parse.h</a>"</font>
00073 
00074 
00075 <font class="preprocessor">#ifdef NL_OS_WINDOWS</font>
00076 <font class="preprocessor"></font><font class="preprocessor">#include "<a class="code" href="win__event__emitter_8h.html">nel/misc/win_event_emitter.h</a>"</font>
00077 <font class="preprocessor">#elif defined (NL_OS_UNIX)</font>
00078 <font class="preprocessor"></font><font class="preprocessor">#include "<a class="code" href="unix__event__emitter_8h.html">unix_event_emitter.h</a>"</font>
00079 <font class="preprocessor">#endif // NL_OS_UNIX</font>
00080 <font class="preprocessor"></font>
00081 
00082 <font class="comment">// For optimisation consideration, allow 256 lightmaps at max.</font>
<a name="l00083"></a><a class="code" href="driver__opengl_8h.html#a1">00083</a> <font class="preprocessor">#define NL3D_DRV_MAX_LIGHTMAP           256</font>
00084 <font class="preprocessor"></font>
00085 
00086 <font class="keyword">namespace </font>NL3D {
00087 
00088 <font class="keyword">using</font> <a class="code" href="classNLMISC_1_1CMatrix.html">NLMISC::CMatrix</a>;
00089 <font class="keyword">using</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a>;
00090 
00091 
00092 <font class="keyword">class   </font>CDriverGL;
00093 <font class="keyword">class   </font>IVertexArrayRange;
00094 <font class="keyword">class   </font>IVertexBufferHardGL;
00095 
00096 
00097 <font class="comment">// ***************************************************************************</font>
<a name="l00098"></a><a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html">00098</a> <font class="keyword">class </font>CTextureDrvInfosGL : <font class="keyword">public</font> ITextureDrvInfos
00099 {
00100 <font class="keyword">public</font>:
00101         <font class="comment">/*</font>
00102 <font class="comment">                ANY DATA ADDED HERE MUST BE SWAPPED IN swapTextureHandle() !!</font>
00103 <font class="comment">        */</font>
00104 
00105         <font class="comment">// The GL Id.</font>
<a name="l00106"></a><a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m0">00106</a>         <a class="code" href="driver__opengl__extension__def_8h.html#a423">GLuint</a>                                  <a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m0">ID</a>;
00107         <font class="comment">// Is the internal format of the texture is a compressed one?</font>
<a name="l00108"></a><a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m1">00108</a>         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m1">Compressed</a>;
00109 
00110         <font class="comment">// This is the computed size of what memory this texture take.</font>
<a name="l00111"></a><a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m2">00111</a>         uint32                                  <a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m2">TextureMemory</a>;
00112         <font class="comment">// This is the owner driver.</font>
<a name="l00113"></a><a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m3">00113</a>         CDriverGL                               *<a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m3">_Driver</a>;
00114 
00115 
00116         <font class="comment">// The current wrap modes assigned to the texture.</font>
<a name="l00117"></a><a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m4">00117</a>         ITexture::TWrapMode             <a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m4">WrapS</a>;
<a name="l00118"></a><a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m5">00118</a>         ITexture::TWrapMode             <a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m5">WrapT</a>;
<a name="l00119"></a><a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m6">00119</a>         ITexture::TMagFilter    <a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m6">MagFilter</a>;
<a name="l00120"></a><a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m7">00120</a>         ITexture::TMinFilter    <a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#m7">MinFilter</a>;
00121 
00122         <font class="comment">// The gl id is auto created here.</font>
00123         <a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#a0">CTextureDrvInfosGL</a>(IDriver *drv, <a class="code" href="namespaceNL3D.html#a246">ItTexDrvInfoPtrMap</a> it, CDriverGL *drvGl);
00124         <font class="comment">// The gl id is auto deleted here.</font>
00125         <a class="code" href="classNL3D_1_1CTextureDrvInfosGL.html#a1">~CTextureDrvInfosGL</a>();
00126 };
00127 
00128 
00129 <font class="comment">// ***************************************************************************</font>
<a name="l00130"></a><a class="code" href="classNL3D_1_1CVBDrvInfosGL.html">00130</a> <font class="keyword">class </font>CVBDrvInfosGL : <font class="keyword">public</font> IVBDrvInfos
00131 {
00132 <font class="keyword">public</font>:
<a name="l00133"></a><a class="code" href="classNL3D_1_1CVBDrvInfosGL.html#a0">00133</a>         <a class="code" href="classNL3D_1_1CVBDrvInfosGL.html#a0">CVBDrvInfosGL</a>(IDriver *drv, <a class="code" href="namespaceNL3D.html#a295">ItVBDrvInfoPtrList</a> it) : <a class="code" href="classNL3D_1_1IVBDrvInfos.html#a0">IVBDrvInfos</a>(drv, it) {}
00134 };
00135 
00136 
00137 <font class="comment">// ***************************************************************************</font>
<a name="l00138"></a><a class="code" href="classNL3D_1_1CShaderGL.html">00138</a> <font class="keyword">class </font>CShaderGL : <font class="keyword">public</font> IShader
00139 {
00140 <font class="keyword">public</font>:
<a name="l00141"></a><a class="code" href="classNL3D_1_1CShaderGL.html#m0">00141</a>         GLenum          <a class="code" href="classNL3D_1_1CShaderGL.html#m0">SrcBlend</a>;
<a name="l00142"></a><a class="code" href="classNL3D_1_1CShaderGL.html#m1">00142</a>         GLenum          <a class="code" href="classNL3D_1_1CShaderGL.html#m1">DstBlend</a>;
<a name="l00143"></a><a class="code" href="classNL3D_1_1CShaderGL.html#m2">00143</a>         GLenum          <a class="code" href="classNL3D_1_1CShaderGL.html#m2">ZComp</a>;
00144 
<a name="l00145"></a><a class="code" href="classNL3D_1_1CShaderGL.html#m3">00145</a>         GLfloat         <a class="code" href="classNL3D_1_1CShaderGL.html#m3">Emissive</a>[4];
<a name="l00146"></a><a class="code" href="classNL3D_1_1CShaderGL.html#m4">00146</a>         GLfloat         <a class="code" href="classNL3D_1_1CShaderGL.html#m4">Ambient</a>[4];
<a name="l00147"></a><a class="code" href="classNL3D_1_1CShaderGL.html#m5">00147</a>         GLfloat         <a class="code" href="classNL3D_1_1CShaderGL.html#m5">Diffuse</a>[4];
<a name="l00148"></a><a class="code" href="classNL3D_1_1CShaderGL.html#m6">00148</a>         GLfloat         <a class="code" href="classNL3D_1_1CShaderGL.html#m6">Specular</a>[4];
00149         <font class="comment">// For fast comp.</font>
<a name="l00150"></a><a class="code" href="classNL3D_1_1CShaderGL.html#m7">00150</a>         uint32          <a class="code" href="classNL3D_1_1CShaderGL.html#m7">PackedEmissive</a>;
<a name="l00151"></a><a class="code" href="classNL3D_1_1CShaderGL.html#m8">00151</a>         uint32          <a class="code" href="classNL3D_1_1CShaderGL.html#m8">PackedAmbient</a>;
<a name="l00152"></a><a class="code" href="classNL3D_1_1CShaderGL.html#m9">00152</a>         uint32          <a class="code" href="classNL3D_1_1CShaderGL.html#m9">PackedDiffuse</a>;
<a name="l00153"></a><a class="code" href="classNL3D_1_1CShaderGL.html#m10">00153</a>         uint32          <a class="code" href="classNL3D_1_1CShaderGL.html#m10">PackedSpecular</a>;
00154 
00155         <font class="comment">// The supported Shader type.</font>
<a name="l00156"></a><a class="code" href="classNL3D_1_1CShaderGL.html#m11">00156</a>         CMaterial::TShader      <a class="code" href="classNL3D_1_1CShaderGL.html#m11">SupportedShader</a>;
00157 
<a name="l00158"></a><a class="code" href="classNL3D_1_1CShaderGL.html#a0">00158</a>         <a class="code" href="classNL3D_1_1CShaderGL.html#a0">CShaderGL</a>(IDriver *drv, <a class="code" href="namespaceNL3D.html#a235">ItShaderPtrList</a> it) : <a class="code" href="classNL3D_1_1IShader.html#a0">IShader</a>(drv, it) {}
00159 };
00160 
00161 
00162 <font class="comment">// ***************************************************************************</font>
<a name="l00164"></a><a class="code" href="classNL3D_1_1CVertexBufferInfo.html">00164</a> <font class="comment">class   CVertexBufferInfo</font>
00165 {
00166 <font class="keyword">public</font>:
<a name="l00167"></a><a class="code" href="classNL3D_1_1CVertexBufferInfo.html#m0">00167</a>         uint16                                  VertexFormat;
<a name="l00168"></a><a class="code" href="classNL3D_1_1CVertexBufferInfo.html#m1">00168</a>         uint16                                  VertexSize;
<a name="l00169"></a><a class="code" href="classNL3D_1_1CVertexBufferInfo.html#m2">00169</a>         uint32                                  NumVertices;
<a name="l00170"></a><a class="code" href="classNL3D_1_1CVertexBufferInfo.html#m3">00170</a>         uint32                                  NumWeight;      
<a name="l00171"></a><a class="code" href="classNL3D_1_1CVertexBufferInfo.html#m4">00171</a>         CVertexBuffer::TType    Type[CVertexBuffer::NumValue];
00172 
00173         <font class="comment">// NB: ptrs are invalid if VertexFormat does not support the compoennt. must test VertexFormat, not the ptr.</font>
<a name="l00174"></a><a class="code" href="classNL3D_1_1CVertexBufferInfo.html#m5">00174</a>         <font class="keywordtype">void</font>                                    *ValuePtr[CVertexBuffer::NumValue];
00175 
00176 
00177         <font class="comment">// ATI Special setup ?</font>
<a name="l00178"></a><a class="code" href="classNL3D_1_1CVertexBufferInfo.html#m6">00178</a>         <font class="keywordtype">bool</font>                                    ATIVBHardMode;
00179         <font class="comment">// the handle of ATI memory</font>
<a name="l00180"></a><a class="code" href="classNL3D_1_1CVertexBufferInfo.html#m7">00180</a>         uint                                    ATIVertexObjectId;
00181         <font class="comment">// This is the offset relative to the ATIVertexObjectId start mem.</font>
<a name="l00182"></a><a class="code" href="classNL3D_1_1CVertexBufferInfo.html#m8">00182</a>         uint                                    ATIValueOffset[CVertexBuffer::NumValue];
00183 
00184 
00185         <font class="keywordtype">void</font>            setupVertexBuffer(CVertexBuffer &amp;vb);
00186         <font class="keywordtype">void</font>            setupVertexBufferHard(IVertexBufferHardGL &amp;vb);
00187 };
00188 
00189 
00190 
00191 <font class="comment">// ***************************************************************************</font>
<a name="l00192"></a><a class="code" href="classNL3D_1_1CDriverGL.html">00192</a> <font class="keyword">class </font>CDriverGL : <font class="keyword">public</font> IDriver
00193 {
00194 <font class="keyword">public</font>:
00195 
00196         <font class="comment">// Some constants</font>
00197         <font class="keyword">enum</font> { <a class="code" href="classNL3D_1_1CDriverGL.html#s6s0">MaxLight</a>=8 };
00198 
00199         <font class="comment">// Acces</font>
<a name="l00200"></a><a class="code" href="classNL3D_1_1CDriverGL.html#a0">00200</a>         uint32                                  <a class="code" href="classNL3D_1_1CDriverGL.html#a0">getHwnd</a> ()
00201         {
00202 <font class="preprocessor">#ifdef NL_OS_WINDOWS</font>
00203 <font class="preprocessor"></font>                <font class="keywordflow">return</font> (uint32)_hWnd;
00204 <font class="preprocessor">#else // NL_OS_WINDOWS</font>
00205 <font class="preprocessor"></font>                <font class="keywordflow">return</font> 0;
00206 <font class="preprocessor">#endif // NL_OS_WINDOWS</font>
00207 <font class="preprocessor"></font>        }
00208 
00209                                                         <a class="code" href="classNL3D_1_1CDriverGL.html#a1">CDriverGL</a>();
00210         <font class="keyword">virtual</font>                                 <a class="code" href="classNL3D_1_1CDriverGL.html#a2">~CDriverGL</a>();
00211 
00212         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a3">init</a>();
00213 
00214         <font class="keyword">virtual</font> <a class="code" href="namespaceNL3D.html#a28">ModeList</a>                <a class="code" href="classNL3D_1_1CDriverGL.html#a4">enumModes</a>();
00215 
00216         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a5">disableHardwareVertexProgram</a>();
00217         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a6">disableHardwareVertexArrayAGP</a>();
00218         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a7">disableHardwareTextureShader</a>();
00219 
00220         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a8">setDisplay</a>(<font class="keywordtype">void</font>* wnd, <font class="keyword">const</font> GfxMode&amp; mode) <font class="keywordflow">throw</font>(EBadDisplay);
00221 
<a name="l00222"></a><a class="code" href="classNL3D_1_1CDriverGL.html#a9">00222</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>*                   <a class="code" href="classNL3D_1_1CDriverGL.html#a9">getDisplay</a>()
00223         {
00224 <font class="preprocessor">#ifdef NL_OS_WINDOWS</font>
00225 <font class="preprocessor"></font>                <font class="keywordflow">return</font> (<font class="keywordtype">void</font>*)_hWnd;
00226 <font class="preprocessor">#else // NL_OS_WINDOWS</font>
00227 <font class="preprocessor"></font>                <font class="keywordflow">return</font> NULL;
00228 <font class="preprocessor">#endif // NL_OS_WINDOWS</font>
00229 <font class="preprocessor"></font>        }
00230 
00231         <font class="keyword">virtual</font> <a class="code" href="namespaceNL3D.html#a29">emptyProc</a>               <a class="code" href="classNL3D_1_1CDriverGL.html#a10">getWindowProc</a>();
00232 
00233         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a11">activate</a>();
00234 
00235         <font class="keyword">virtual</font> sint                    <a class="code" href="classNL3D_1_1CDriverGL.html#a12">getNbTextureStages</a>() <font class="keyword">const</font>;
00236 
00237         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a13">isTextureExist</a>(<font class="keyword">const</font> ITexture&amp;tex);
00238 
<a name="l00239"></a><a class="code" href="classNL3D_1_1CDriverGL.html#a14">00239</a>         <font class="keyword">virtual</font> <a class="code" href="classNLMISC_1_1IEventEmitter.html">NLMISC::IEventEmitter</a>   *<a class="code" href="classNL3D_1_1CDriverGL.html#a14">getEventEmitter</a>() { <font class="keywordflow">return</font>&amp;_EventEmitter; };
00240 
00241         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a15">clear2D</a>(CRGBA rgba);
00242 
00243         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a16">clearZBuffer</a>(<font class="keywordtype">float</font> zval=1);
00244         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a17">setColorMask</a> (<font class="keywordtype">bool</font> bRed, <font class="keywordtype">bool</font> bGreen, <font class="keywordtype">bool</font> bBlue, <font class="keywordtype">bool</font> bAlpha);
00245 
00246         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a18">setupTexture</a> (ITexture&amp; tex);
00247 
00248         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a19">setupTextureEx</a> (ITexture&amp; tex, <font class="keywordtype">bool</font> bUpload, <font class="keywordtype">bool</font> &amp;bAllUploaded, <font class="keywordtype">bool</font> bMustRecreateSharedTexture= <font class="keyword">false</font>);
00249         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a20">uploadTexture</a> (ITexture&amp; tex, <a class="code" href="classNLMISC_1_1CRect.html">NLMISC::CRect</a>&amp; rect, uint8 nNumMipMap);
00250         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a21">uploadTextureCube</a> (ITexture&amp; tex, <a class="code" href="classNLMISC_1_1CRect.html">NLMISC::CRect</a>&amp; rect, uint8 nNumMipMap, uint8 nNumFace);
00251 
00252         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a22">forceDXTCCompression</a>(<font class="keywordtype">bool</font> dxtcComp);
00253 
00254         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a23">forceTextureResize</a>(uint divisor);
00255 
00257         <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CDriverGL.html#a24">setTextureEnvFunction</a>(uint stage, CMaterial&amp; mat);
00258 
00260         <font class="keywordtype">void</font>      <a class="code" href="classNL3D_1_1CDriverGL.html#a25">setupUserTextureMatrix</a>(uint numStages, CMaterial&amp; mat);
00261 
00263         <font class="keywordtype">void</font>      <a class="code" href="classNL3D_1_1CDriverGL.html#a26">disableUserTextureMatrix</a>();
00264 
00266         <font class="comment">/*static inline void            setupCausticsFirstTex(const CMaterial &amp;mat);</font>
00267 <font class="comment"></font>
00269 <font class="comment">        static inline void              setupCausticsSecondTex(uint stage);*/</font>
00270 
00271         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a27">setupMaterial</a>(CMaterial&amp; mat);
00272 
00273         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a28">setFrustum</a>(<font class="keywordtype">float</font> left, <font class="keywordtype">float</font> right, <font class="keywordtype">float</font> bottom, <font class="keywordtype">float</font> top, <font class="keywordtype">float</font> znear, <font class="keywordtype">float</font> zfar, <font class="keywordtype">bool</font> perspective = <font class="keyword">true</font>);
00274 
00275         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a29">setupViewMatrix</a>(<font class="keyword">const</font> CMatrix&amp; mtx);
00276 
00277         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a30">setupViewMatrixEx</a>(<font class="keyword">const</font> CMatrix&amp; mtx, <font class="keyword">const</font> CVector &amp;cameraPos);
00278 
00279         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a31">setupModelMatrix</a>(<font class="keyword">const</font> CMatrix&amp; mtx);
00280 
00281         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a32">multiplyModelMatrix</a>(<font class="keyword">const</font> CMatrix&amp; mtx);
00282 
00283         <font class="keyword">virtual</font> CMatrix                 <a class="code" href="classNL3D_1_1CDriverGL.html#a33">getViewMatrix</a>() <font class="keyword">const</font>;
00284 
<a name="l00285"></a><a class="code" href="classNL3D_1_1CDriverGL.html#a34">00285</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a34">forceNormalize</a>(<font class="keywordtype">bool</font> normalize)
00286         {
00287                 <a class="code" href="classNL3D_1_1CDriverGL.html#o4">_ForceNormalize</a>= normalize;
00288                 <font class="comment">// if ForceNormalize, must enable GLNormalize now.</font>
00289                 <font class="keywordflow">if</font>(normalize)
00290                         <a class="code" href="classNL3D_1_1CDriverGL.html#c24">enableGlNormalize</a>(<font class="keyword">true</font>);
00291         }
00292 
<a name="l00293"></a><a class="code" href="classNL3D_1_1CDriverGL.html#a35">00293</a>         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a35">isForceNormalize</a>()<font class="keyword"> const</font>
00294 <font class="keyword">        </font>{
00295                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverGL.html#o4">_ForceNormalize</a>;
00296         }
00297 
00298 
00299         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a36">supportVertexBufferHard</a>() <font class="keyword">const</font>;
00300 
00301         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a37">slowUnlockVertexBufferHard</a>() <font class="keyword">const</font>;
00302 
00303         <font class="keyword">virtual</font> uint                    <a class="code" href="classNL3D_1_1CDriverGL.html#a38">getMaxVerticesByVertexBufferHard</a>() <font class="keyword">const</font>;
00304 
00305         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a39">initVertexArrayRange</a>(uint agpMem, uint vramMem);
00306 
00307         <font class="keyword">virtual</font> IVertexBufferHard       *<a class="code" href="classNL3D_1_1CDriverGL.html#a40">createVertexBufferHard</a>(uint16 vertexFormat, <font class="keyword">const</font> uint8 *typeArray, uint32 numVertices, 
00308                                                                                                                 IDriver::TVBHardType vbType);
00309 
00310         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a41">deleteVertexBufferHard</a>(IVertexBufferHard *VB);
00311 
00312         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a42">activeVertexBufferHard</a>(IVertexBufferHard *VB);
00313 
00314 
00315         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a43">activeVertexBuffer</a>(CVertexBuffer&amp; VB);
00316 
00317         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a43">activeVertexBuffer</a>(CVertexBuffer&amp; VB, uint first, uint end);
00318 
00319         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a45">mapTextureStageToUV</a>(uint stage, uint uv);
00320 
00321         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a46">render</a>(CPrimitiveBlock&amp; PB, CMaterial&amp; Mat);
00322 
00323         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a47">renderTriangles</a>(CMaterial&amp; Mat, uint32 *tri, uint32 ntris);
00324 
00325         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a48">renderSimpleTriangles</a>(uint32 *tri, uint32 ntris);
00326 
00327         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a49">renderPoints</a>(CMaterial&amp; Mat, uint32 numPoints) ;
00328         
00329         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a50">renderQuads</a>(CMaterial&amp; Mat, uint32 startIndex, uint32 numQuads) ;
00330 
00331         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a51">swapBuffers</a>();
00332 
00333         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a52">profileRenderedPrimitives</a>(CPrimitiveProfile &amp;pIn, CPrimitiveProfile &amp;pOut);
00334 
00335         <font class="keyword">virtual</font> uint32                  <a class="code" href="classNL3D_1_1CDriverGL.html#a53">profileAllocatedTextureMemory</a>();
00336 
00337         <font class="keyword">virtual</font> uint32                  <a class="code" href="classNL3D_1_1CDriverGL.html#a54">profileSetupedMaterials</a>() <font class="keyword">const</font>;
00338 
00339         <font class="keyword">virtual</font> uint32                  <a class="code" href="classNL3D_1_1CDriverGL.html#a55">profileSetupedModelMatrix</a>() <font class="keyword">const</font>;
00340 
00341         <font class="keywordtype">void</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#a56">enableUsedTextureMemorySum</a> (<font class="keywordtype">bool</font> enable);
00342         
00343         uint32                                  <a class="code" href="classNL3D_1_1CDriverGL.html#a57">getUsedTextureMemory</a>() <font class="keyword">const</font>;
00344 
00345         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a58">release</a>();
00346 
00347         <font class="keyword">virtual</font> <a class="code" href="classNL3D_1_1IDriver.html#s41">TMessageBoxId</a>   <a class="code" href="classNL3D_1_1CDriverGL.html#a59">systemMessageBox</a> (<font class="keyword">const</font> <font class="keywordtype">char</font>* message, <font class="keyword">const</font> <font class="keywordtype">char</font>* title, <a class="code" href="classNL3D_1_1IDriver.html#s42">TMessageBoxType</a> <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>=<a class="code" href="classNL3D_1_1IDriver.html#s42s8">okType</a>, <a class="code" href="classNL3D_1_1IDriver.html#s43">TMessageBoxIcon</a> icon=<a class="code" href="classNL3D_1_1IDriver.html#s43s15">noIcon</a>);
00348 
00349         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a60">setupScissor</a> (<font class="keyword">const</font> <font class="keyword">class</font> CScissor&amp; scissor);
00350 
00351         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a61">setupViewport</a> (<font class="keyword">const</font> <font class="keyword">class</font> CViewport&amp; viewport);
00352 
<a name="l00353"></a><a class="code" href="classNL3D_1_1CDriverGL.html#a62">00353</a>         <font class="keyword">virtual</font> uint32                  <a class="code" href="classNL3D_1_1CDriverGL.html#a62">getImplementationVersion</a> ()<font class="keyword"> const</font>
00354 <font class="keyword">        </font>{
00355                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverGL.html#r0">ReleaseVersion</a>;
00356         }
00357 
<a name="l00358"></a><a class="code" href="classNL3D_1_1CDriverGL.html#a63">00358</a>         <font class="keyword">virtual</font> <font class="keyword">const</font> <font class="keywordtype">char</font>*             <a class="code" href="classNL3D_1_1CDriverGL.html#a63">getDriverInformation</a> ()
00359         {
00360                 <font class="keywordflow">return</font> <font class="stringliteral">"Opengl 1.2 NeL Driver"</font>;
00361         }
00362 
00363         <font class="keyword">virtual</font> <font class="keyword">const</font> <font class="keywordtype">char</font>*             <a class="code" href="classNL3D_1_1CDriverGL.html#a64">getVideocardInformation</a> ();
00364 
00365         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a65">isActive</a> ();
00366 
00367         <font class="keyword">virtual</font> uint8                   <a class="code" href="classNL3D_1_1CDriverGL.html#a66">getBitPerPixel</a> ();
00368 
00369         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a67">showCursor</a> (<font class="keywordtype">bool</font> b);
00370 
00371         <font class="comment">// between 0.0 and 1.0</font>
00372         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a68">setMousePos</a>(<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>);
00373 
00374         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a69">setCapture</a> (<font class="keywordtype">bool</font> b);
00375 
00376         <font class="keyword">virtual</font> <a class="code" href="structNLMISC_1_1IMouseDevice.html">NLMISC::IMouseDevice</a>                    *<a class="code" href="classNL3D_1_1CDriverGL.html#a70">enableLowLevelMouse</a>(<font class="keywordtype">bool</font> enable);
00377                 
00378         <font class="keyword">virtual</font> <a class="code" href="structNLMISC_1_1IKeyboardDevice.html">NLMISC::IKeyboardDevice</a>                 *<a class="code" href="classNL3D_1_1CDriverGL.html#a71">enableLowLevelKeyboard</a>(<font class="keywordtype">bool</font> enable);
00379 
00380         <font class="keyword">virtual</font> <a class="code" href="structNLMISC_1_1IInputDeviceManager.html">NLMISC::IInputDeviceManager</a>             *<a class="code" href="classNL3D_1_1CDriverGL.html#a72">getLowLevelInputDeviceManager</a>();
00381 
00382         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a73">getWindowSize</a> (uint32 &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>, uint32 &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>);
00383 
00384         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a74">getBuffer</a> (CBitmap &amp;bitmap);
00385 
00386         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a75">getZBuffer</a> (std::vector&lt;float&gt;  &amp;zbuffer);
00387 
00388         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a76">getBufferPart</a> (CBitmap &amp;bitmap, <a class="code" href="classNLMISC_1_1CRect.html">NLMISC::CRect</a> &amp;rect);
00389 
00390         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a77">getZBufferPart</a> (std::vector&lt;float&gt;  &amp;zbuffer, <a class="code" href="classNLMISC_1_1CRect.html">NLMISC::CRect</a> &amp;rect);
00391                 
00392         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a78">copyFrameBufferToTexture</a>(ITexture *tex,
00393                                                              uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a387">level</a>,
00394                                                                                                          uint32 offsetx,
00395                                                                                                          uint32 offsety,
00396                                                                                                          uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a364">x</a>,
00397                                                                                                          uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a365">y</a>,
00398                                                                                                          uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>,
00399                                                                                                          uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>                                                                                                          
00400                                                                                                         );
00401 
00402         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a79">fillBuffer</a> (CBitmap &amp;bitmap);
00403 
00404         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a80">setPolygonMode</a> (<a class="code" href="classNL3D_1_1IDriver.html#s44">TPolygonMode</a> mode);
00405 
00406         <font class="keyword">virtual</font> uint                    <a class="code" href="classNL3D_1_1CDriverGL.html#a81">getMaxLight</a> () <font class="keyword">const</font>;
00407 
00408         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a82">setLight</a> (uint8 <a class="code" href="driver__opengl__extension__def_8h.html#a410">num</a>, <font class="keyword">const</font> CLight&amp; light);
00409 
00410         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a83">enableLight</a> (uint8 <a class="code" href="driver__opengl__extension__def_8h.html#a410">num</a>, <font class="keywordtype">bool</font> enable=<font class="keyword">true</font>);
00411 
00412         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a84">setPerPixelLightingLight</a>(CRGBA diffuse, CRGBA specular, <font class="keywordtype">float</font> shininess);
00413 
00414         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a85">setAmbientColor</a> (CRGBA color);
00415 
00417         <font class="comment">// @{</font>
00418         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z399_0">fogEnabled</a>();
00419         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z399_1">enableFog</a>(<font class="keywordtype">bool</font> enable);
00421         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z399_2">setupFog</a>(<font class="keywordtype">float</font> start, <font class="keywordtype">float</font> end, CRGBA color);
00422         <font class="comment">// @}</font>
00423 
00425         <font class="comment">// @{</font>
00426         <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CDriverGL.html#z400_0">supportTextureShaders</a>() <font class="keyword">const</font>;
00427 
00428         <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CDriverGL.html#z400_1">isTextureAddrModeSupported</a>(CMaterial::TTexAddressingMode mode) <font class="keyword">const</font>;
00429 
00430         <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CDriverGL.html#z400_2">setMatrix2DForTextureOffsetAddrMode</a>(<font class="keyword">const</font> uint stage, <font class="keyword">const</font> <font class="keywordtype">float</font> mat[4]);
00431         <font class="comment">// @}</font>
00432 
00434         <font class="comment">// @{</font>
00435                 <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CDriverGL.html#z401_0">supportEMBM</a>() <font class="keyword">const</font>;               
00436                 <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CDriverGL.html#z401_1">isEMBMSupportedAtStage</a>(uint stage) <font class="keyword">const</font>;
00437                 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CDriverGL.html#z401_2">setEMBMMatrix</a>(<font class="keyword">const</font> uint stage, <font class="keyword">const</font> <font class="keywordtype">float</font> mat[4]);
00438         <font class="comment">// @}</font>
00439 
00440         <font class="keyword">virtual</font> <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CDriverGL.html#a86">supportPerPixelLighting</a>(<font class="keywordtype">bool</font> specular) <font class="keyword">const</font>;
00441 
00442 
00444         <font class="comment">// @{</font>
00445         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z402_0">supportBlendConstantColor</a>() <font class="keyword">const</font>;
00446         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z402_1">setBlendConstantColor</a>(<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> col);
00447         <font class="keyword">virtual</font> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a>   <a class="code" href="classNL3D_1_1CDriverGL.html#z402_2">getBlendConstantColor</a>() <font class="keyword">const</font>;
00448         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z402_3">setMonitorColorProperties</a> (<font class="keyword">const</font> CMonitorColorProperties &amp;properties);
00449         <font class="comment">// @}</font>
00450 
00451 
00452         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#a87">swapTextureHandle</a>(ITexture &amp;tex0, ITexture &amp;tex1);
00453 
00454 
00455 <font class="keyword">private</font>:
<a name="l00456"></a><a class="code" href="classNL3D_1_1CDriverGL.html#l0">00456</a>         <font class="keyword">friend</font> <font class="keyword">class                                    </font><a class="code" href="classNL3D_1_1CDriverGL.html#l0">CTextureDrvInfosGL</a>;
<a name="l00457"></a><a class="code" href="classNL3D_1_1CDriverGL.html#l1">00457</a>         <font class="keyword">friend</font> <font class="keyword">class                                    </font><a class="code" href="classNL3D_1_1CDriverGL.html#l1">CVertexProgamDrvInfosGL</a>;
00458 
00459 
00460 <font class="keyword">private</font>:
00461         <font class="comment">// Version of the driver. Not the interface version!! Increment when implementation of the driver change.</font>
00462         <font class="keyword">static</font> <font class="keyword">const</font> uint32             <a class="code" href="classNL3D_1_1CDriverGL.html#r0">ReleaseVersion</a>;
00463 
<a name="l00464"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o0">00464</a>         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#o0">_FullScreen</a>;
<a name="l00465"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o1">00465</a>         <font class="keywordtype">bool</font>                                            <a class="code" href="classNL3D_1_1CDriverGL.html#o1">_OffScreen</a>;
00466 
00467 <font class="preprocessor">#ifdef NL_OS_WINDOWS</font>
00468 <font class="preprocessor"></font>
00469         <font class="keyword">friend</font> <font class="keyword">static</font> <font class="keywordtype">void</font> GlWndProc(<a class="code" href="classNL3D_1_1CDriverGL.html#a1">CDriverGL</a> *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
00470         
00471         HWND                                            _hWnd;
00472         sint32                                          _WindowWidth, _WindowHeight;
00473         HDC                                                     _hDC;
00474         PIXELFORMATDESCRIPTOR           _pfd;
00475     HGLRC                                               _hRC;
00476         <font class="keyword">static</font> uint                                     _Registered;
00477         DEVMODE                                         _OldScreenMode;
00478         <a class="code" href="classNLMISC_1_1CEventEmitterMulti.html">NLMISC::CEventEmitterMulti</a>      _EventEmitter; <font class="comment">// this can contains a win emitter and eventually a direct input emitter </font>
00479         <font class="keywordtype">bool</font>                                            _DestroyWindow;
00480 
00481         <font class="comment">// Off-screen rendering in Dib section</font>
00482         HPBUFFERARB                                     _PBuffer;
00483 
00484 <font class="preprocessor">#elif defined (NL_OS_UNIX)</font>
00485 <font class="preprocessor"></font>
00486         Display                                         *dpy;
00487         GLXContext                                      ctx;
00488         Window                                          win;
00489         Cursor                                          cursor;
00490         NLMISC::CUnixEventEmitter       _EventEmitter;
00491 
00492 <font class="preprocessor">#ifdef XF86VIDMODE</font>
00493 <font class="preprocessor"></font>        <font class="keywordtype">int</font>                                             _OldDotClock;   <font class="comment">// old dotclock</font>
00494         XF86VidModeModeLine             _OldScreenMode; <font class="comment">// old modeline</font>
00495         <font class="keywordtype">int</font>                                             _OldX, _OldY;   <font class="comment">//Viewport settings</font>
00496 <font class="preprocessor">#endif //XF86VIDMODE</font>
00497 <font class="preprocessor"></font>
00498 <font class="preprocessor">#endif // NL_OS_UNIX</font>
00499 <font class="preprocessor"></font>
<a name="l00500"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o2">00500</a>         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#o2">_Initialized</a>;
00501 
00503         <font class="comment">// @{</font>
00504         <font class="comment">// OpenGL extensions Extensions.</font>
<a name="l00505"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z403_0">00505</a>         CGlExtensions                   <a class="code" href="classNL3D_1_1CDriverGL.html#z403_0">_Extensions</a>;
00506         <font class="comment">// @}</font>
00507 
00508 
00509         <font class="comment">// Depth of the driver in Bit Per Pixel</font>
<a name="l00510"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o3">00510</a>         uint8                                   <a class="code" href="classNL3D_1_1CDriverGL.html#o3">_Depth</a>;
00511 
00512         <font class="comment">// The forceNormalize() state.</font>
<a name="l00513"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o4">00513</a>         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#o4">_ForceNormalize</a>;
00514 
00515         <font class="comment">// To know if light setup has been changed from last render() ( any call to setupViewMatrix() or setLight() ).</font>
<a name="l00516"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o5">00516</a>         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#o5">_LightSetupDirty</a>;
00517 
00518         <font class="comment">// To know if the modelview matrix setup has been changed from last render() (any call to setupViewMatrix() / setupModelMatrix() ).</font>
<a name="l00519"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o6">00519</a>         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#o6">_ModelViewMatrixDirty</a>;
00520 
00521         <font class="comment">// To know if the projection matrix has been changed</font>
<a name="l00522"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o7">00522</a>         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#o7">_ProjMatDirty</a>;
00523 
00524         <font class="comment">// Mirror the gl projection matrix when _ProjMatDirty = false </font>
<a name="l00525"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o8">00525</a>         <a class="code" href="classNLMISC_1_1CMatrix.html">NLMISC::CMatrix</a>                 <a class="code" href="classNL3D_1_1CDriverGL.html#o8">_GLProjMat</a>;
00526 
00527         <font class="comment">// Ored of _LightSetupDirty and _ModelViewMatrixDirty</font>
<a name="l00528"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o9">00528</a>         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#o9">_RenderSetupDirty</a>;
00529 
00530         <font class="comment">// Backup znear and zfar</font>
<a name="l00531"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o10">00531</a>         <font class="keywordtype">float</font>                                   <a class="code" href="classNL3D_1_1CDriverGL.html#o10">_OODeltaZ</a>;
00532 
00533         <font class="comment">// Current View matrix, in NEL basis. This is the parameter passed in setupViewMatrix*().</font>
<a name="l00534"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o11">00534</a>         CMatrix                                 <a class="code" href="classNL3D_1_1CDriverGL.html#o11">_UserViewMtx</a>;
00535         <font class="comment">// Current (OpenGL basis) View matrix.</font>
00536         <font class="comment">// NB: if setuped with setupViewMatrixEx(), _ViewMtx.Pos()==(0,0,0)</font>
<a name="l00537"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o12">00537</a>         CMatrix                                 <a class="code" href="classNL3D_1_1CDriverGL.html#o12">_ViewMtx</a>;
00538         <font class="comment">// Matrix used for specular</font>
<a name="l00539"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o13">00539</a>         CMatrix                                 <a class="code" href="classNL3D_1_1CDriverGL.html#o13">_TexMtx</a>;
00540         <font class="comment">// Precision ZBuffer: The Current cameraPosition, to remove from each model Position.</font>
<a name="l00541"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o14">00541</a>         CVector                                 <a class="code" href="classNL3D_1_1CDriverGL.html#o14">_PZBCameraPos</a>;
00542 
00543 
00544         <font class="comment">// Current computed (OpenGL basis) ModelView matrix.</font>
00545         <font class="comment">// NB: This matrix have already substracted the _PZBCameraPos</font>
00546         <font class="comment">// Hence this matrix represent the Exact eye-space basis (only _ViewMtx is a bit tricky).</font>
<a name="l00547"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o15">00547</a>         CMatrix                                 <a class="code" href="classNL3D_1_1CDriverGL.html#o15">_ModelViewMatrix</a>;
00548 
00549         <font class="comment">// Fog.</font>
<a name="l00550"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o16">00550</a>         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#o16">_FogEnabled</a>;
<a name="l00551"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o17">00551</a>         GLfloat                                 <a class="code" href="classNL3D_1_1CDriverGL.html#o17">_CurrentFogColor</a>[4];
00552 
00553 
00554         <font class="comment">// Num lights return by GL_MAX_LIGHTS</font>
<a name="l00555"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o18">00555</a>         uint                                            <a class="code" href="classNL3D_1_1CDriverGL.html#o18">_MaxDriverLight</a>;
<a name="l00556"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o19">00556</a>         <font class="keywordtype">bool</font>                                            <a class="code" href="classNL3D_1_1CDriverGL.html#o19">_LightEnable</a>[<a class="code" href="classNL3D_1_1CDriverGL.html#s6s0">MaxLight</a>];                         <font class="comment">// Light enable.</font>
<a name="l00557"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o20">00557</a>         uint                                            <a class="code" href="classNL3D_1_1CDriverGL.html#o20">_LightMode</a>[<a class="code" href="classNL3D_1_1CDriverGL.html#s6s0">MaxLight</a>];                           <font class="comment">// Light mode.</font>
<a name="l00558"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o21">00558</a>         CVector                                         <a class="code" href="classNL3D_1_1CDriverGL.html#o21">_WorldLightPos</a>[<a class="code" href="classNL3D_1_1CDriverGL.html#s6s0">MaxLight</a>];                       <font class="comment">// World position of the lights.</font>
<a name="l00559"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o22">00559</a>         CVector                                         <a class="code" href="classNL3D_1_1CDriverGL.html#o22">_WorldLightDirection</a>[<a class="code" href="classNL3D_1_1CDriverGL.html#s6s0">MaxLight</a>];         <font class="comment">// World direction of the lights.</font>
00560 
00561         <font class="comment">//\name description of the per pixel light</font>
00562         <font class="comment">// @{</font>
00563                 <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CDriverGL.html#z404_0">checkForPerPixelLightingSupport</a>();
<a name="l00564"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z404_1">00564</a>                 <font class="keywordtype">bool</font>                                            <a class="code" href="classNL3D_1_1CDriverGL.html#z404_1">_SupportPerPixelShader</a>;
<a name="l00565"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z404_2">00565</a>                 <font class="keywordtype">bool</font>                                            <a class="code" href="classNL3D_1_1CDriverGL.html#z404_2">_SupportPerPixelShaderNoSpec</a>;
<a name="l00566"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z404_3">00566</a>                 <font class="keywordtype">float</font>                                           <a class="code" href="classNL3D_1_1CDriverGL.html#z404_3">_PPLExponent</a>;
<a name="l00567"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z404_4">00567</a>                 <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a>                           <a class="code" href="classNL3D_1_1CDriverGL.html#z404_4">_PPLightDiffuseColor</a>;
<a name="l00568"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z404_5">00568</a>                 <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a>                           <a class="code" href="classNL3D_1_1CDriverGL.html#z404_5">_PPLightSpecularColor</a>;
00569         <font class="comment">// @}</font>
00570 
00571         
00572 
00574         <font class="comment">// @{</font>
00575 
00576         <font class="comment">// Special Texture environnements.</font>
<a name="l00577"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z405_0">00577</a>         <font class="keyword">enum</font>    <a class="code" href="classNL3D_1_1CDriverGL.html#z405_0">CTexEnvSpecial</a> {
00578                 <a class="code" href="classNL3D_1_1CDriverGL.html#z405_0u0">TexEnvSpecialDisabled</a>= 0, 
00579                 <a class="code" href="classNL3D_1_1CDriverGL.html#z405_0u1">TexEnvSpecialLightMap</a>, 
00580                 <a class="code" href="classNL3D_1_1CDriverGL.html#z405_0u2">TexEnvSpecialSpecularStage0</a>,
00581                 <a class="code" href="classNL3D_1_1CDriverGL.html#z405_0u3">TexEnvSpecialSpecularStage1</a>,
00582                 <a class="code" href="classNL3D_1_1CDriverGL.html#z405_0u4">TexEnvSpecialSpecularStage1NoText</a>,
00583                 <a class="code" href="classNL3D_1_1CDriverGL.html#z405_0u5">TexEnvSpecialPPLStage0</a>,
00584                 <a class="code" href="classNL3D_1_1CDriverGL.html#z405_0u6">TexEnvSpecialPPLStage2</a>,
00585                 <a class="code" href="classNL3D_1_1CDriverGL.html#z405_0u7">TexEnvSpecialCloudStage0</a>,
00586                 <a class="code" href="classNL3D_1_1CDriverGL.html#z405_0u8">TexEnvSpecialCloudStage1</a>,
00587         };
00588 
00589         <font class="comment">// NB: CRefPtr are not used for mem/spped optimisation. setupMaterial() and setupTexture() reset those states.</font>
<a name="l00590"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z405_2">00590</a>         CMaterial*                              <a class="code" href="classNL3D_1_1CDriverGL.html#z405_2">_CurrentMaterial</a>;
<a name="l00591"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z405_3">00591</a>         CMaterial::TShader              <a class="code" href="classNL3D_1_1CDriverGL.html#z405_3">_CurrentMaterialSupportedShader</a>;
<a name="l00592"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z405_4">00592</a>         ITexture*                               <a class="code" href="classNL3D_1_1CDriverGL.html#z405_4">_CurrentTexture</a>[<a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>];
<a name="l00593"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z405_5">00593</a>         <a class="code" href="classNL3D_1_1CDriverGL.html#l0">CTextureDrvInfosGL</a>*             <a class="code" href="classNL3D_1_1CDriverGL.html#z405_5">_CurrentTextureInfoGL</a>[<a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>];
<a name="l00594"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z405_6">00594</a>         CMaterial::CTexEnv              <a class="code" href="classNL3D_1_1CDriverGL.html#z405_6">_CurrentTexEnv</a>[<a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>];
00595         <font class="comment">// Special Texture Environnement.</font>
<a name="l00596"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z405_7">00596</a>         <a class="code" href="classNL3D_1_1CDriverGL.html#z405_0">CTexEnvSpecial</a>                  <a class="code" href="classNL3D_1_1CDriverGL.html#z405_7">_CurrentTexEnvSpecial</a>[<a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>];
00597         <font class="comment">// Texture addressing mode</font>
<a name="l00598"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z405_8">00598</a>         GLenum                                  <a class="code" href="classNL3D_1_1CDriverGL.html#z405_8">_CurrentTexAddrMode</a>[<a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>];
00599         <font class="comment">// Reset texture shaders to their initial state if they are used</font>
00600         <font class="keywordtype">void</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#z405_1">resetTextureShaders</a>();
00601         <font class="comment">// activation of texture shaders</font>
<a name="l00602"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z405_9">00602</a>         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#z405_9">_NVTextureShaderEnabled</a>;
00603         <font class="comment">// Which stages support EMBM</font>
<a name="l00604"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z405_10">00604</a>         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#z405_10">_StageSupportEMBM</a>[<a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>];
00605 
00606         <font class="comment">// Prec settings for material.</font>
<a name="l00607"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z405_11">00607</a>         CDriverGLStates                 <a class="code" href="classNL3D_1_1CDriverGL.html#z405_11">_DriverGLStates</a>;
00608         <font class="comment">// Optim: To not test change in Materials states if just texture has changed. Very usefull for landscape.</font>
<a name="l00609"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z405_12">00609</a>         uint32                                  <a class="code" href="classNL3D_1_1CDriverGL.html#z405_12">_MaterialAllTextureTouchedFlag</a>;
00610 
00611         <font class="comment">// @}</font>
00612 
<a name="l00613"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o23">00613</a>         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#o23">_CurrentGlNormalize</a>;
00614 
00615 <font class="keyword">private</font>:        
00616         <font class="comment">// Get the proj matrix setupped in GL</font>
00617         <font class="keywordtype">void</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#c0">refreshProjMatrixFromGL</a>();
00618 
00619         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#c1">setupVertexBuffer</a>(CVertexBuffer&amp; VB);
00620         <font class="comment">// Activate Texture Environnement. Do it with caching.</font>
00621         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#c2">activateTexture</a>(uint stage, ITexture *tex);
00622         <font class="comment">// NB: this test _CurrentTexEnv[] and _CurrentTexEnvSpecial[].</font>
00623         <font class="keywordtype">void</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#c3">activateTexEnvMode</a>(uint stage, <font class="keyword">const</font> CMaterial::CTexEnv  &amp;env);
00624         <font class="keywordtype">void</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#c4">activateTexEnvColor</a>(uint stage, <font class="keyword">const</font> CMaterial::CTexEnv  &amp;env);
00625         <font class="comment">// Force Activate Texture Environnement. no caching here. TexEnvSpecial is disabled.</font>
00626         <font class="keywordtype">void</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#c5">forceActivateTexEnvMode</a>(uint stage, <font class="keyword">const</font> CMaterial::CTexEnv  &amp;env);
00627         <font class="keywordtype">void</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#c4">activateTexEnvColor</a>(uint stage, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> col);
<a name="l00628"></a><a class="code" href="classNL3D_1_1CDriverGL.html#c7">00628</a>         <font class="keywordtype">void</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#c7">forceActivateTexEnvColor</a>(uint stage, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> col)
00629         {
00630                 <font class="keyword">static</font>  <font class="keyword">const</font> <font class="keywordtype">float</font>     OO255= 1.0f/255;        
00631                 <a class="code" href="classNL3D_1_1CDriverGL.html#z405_6">_CurrentTexEnv</a>[stage].ConstantColor= col;
00632                 <font class="comment">// Setup the gl cte color.</font>
00633                 <a class="code" href="classNL3D_1_1CDriverGL.html#z405_11">_DriverGLStates</a>.activeTextureARB(stage);
00634                 GLfloat         glcol[4];
00635                 glcol[0]= col.<a class="code" href="classNLMISC_1_1CRGBA.html#m0">R</a>*OO255;
00636                 glcol[1]= col.<a class="code" href="classNLMISC_1_1CRGBA.html#m1">G</a>*OO255;
00637                 glcol[2]= col.<a class="code" href="classNLMISC_1_1CRGBA.html#m2">B</a>*OO255;
00638                 glcol[3]= col.<a class="code" href="classNLMISC_1_1CRGBA.html#m3">A</a>*OO255;
00639                 glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, glcol);        
00640         }
<a name="l00641"></a><a class="code" href="classNL3D_1_1CDriverGL.html#c8">00641</a>         <font class="keywordtype">void</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#c7">forceActivateTexEnvColor</a>(uint stage, <font class="keyword">const</font> CMaterial::CTexEnv  &amp;env)
00642         {       
00643                 <a class="code" href="classNL3D_1_1CDriverGL.html#c7">forceActivateTexEnvColor</a>(stage, env.ConstantColor);     
00644         }
00645 
00646 
00648         <font class="keywordtype">void</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#c9">enableNVTextureShader</a>(<font class="keywordtype">bool</font> enabled);
00649         <font class="comment">// check nv texture shader consistency</font>
00650         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c10">verifyNVTextureShaderConfig</a>();
00651 
00652         <font class="comment">// Called by doRefreshRenderSetup(). set _LightSetupDirty to false</font>
00653         <font class="keywordtype">void</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#c11">cleanLightSetup</a> ();
00654 
00655         <font class="comment">// According to extensions, retrieve GL tex format of the texture.</font>
00656         GLint                                   <a class="code" href="classNL3D_1_1CDriverGL.html#c12">getGlTextureFormat</a>(ITexture&amp; tex, <font class="keywordtype">bool</font> &amp;compressed);
00657 
00658 
00659         <font class="comment">// Clip the wanted rectangle with window. return true if rect is not NULL.</font>
00660         <font class="keywordtype">bool</font>                                    <a class="code" href="classNL3D_1_1CDriverGL.html#c13">clipRect</a>(<a class="code" href="classNLMISC_1_1CRect.html">NLMISC::CRect</a> &amp;rect);
00661 
00662 
00664 
00666         <font class="comment">// @{</font>
00668 <font class="comment">        sint                    beginMultiPass();</font>
00670 <font class="comment">        void                    setupPass(uint pass);</font>
00672 <font class="comment">        void                    endMultiPass();</font>
<a name="l00674"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z406_3">00674</a> <font class="comment">        CVertexBufferInfo       _LastVB;</font>
00675         <font class="comment">// @}</font>
00676 
00677 
00679         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c14">setupUVPtr</a>(uint stage, CVertexBufferInfo &amp;VB, uint uvId);
00680 
00681 
00683         <font class="comment">// @{</font>
00684         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z407_0">computeLightMapInfos</a>(<font class="keyword">const</font> CMaterial &amp;mat);
00685         sint                    <a class="code" href="classNL3D_1_1CDriverGL.html#z407_1">beginLightMapMultiPass</a>();
00686         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z407_2">setupLightMapPass</a>(uint pass);
00687         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z407_3">endLightMapMultiPass</a>();
00688 
<a name="l00690"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z407_5">00690</a>         uint                    <a class="code" href="classNL3D_1_1CDriverGL.html#z407_5">_NLightMaps</a>;
<a name="l00691"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z407_6">00691</a>         uint                    <a class="code" href="classNL3D_1_1CDriverGL.html#z407_6">_NLightMapPerPass</a>;
<a name="l00692"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z407_7">00692</a>         uint                    <a class="code" href="classNL3D_1_1CDriverGL.html#z407_7">_NLightMapPass</a>;
00693         <font class="comment">// This array is the LUT from lmapId in [0, _NLightMaps[, to original lightmap id in material.</font>
<a name="l00694"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z407_8">00694</a>         std::vector&lt;uint&gt;               <a class="code" href="classNL3D_1_1CDriverGL.html#z407_8">_LightMapLUT</a>;
00695 
00696         <font class="comment">// last stage env.</font>
<a name="l00697"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z407_9">00697</a>         CMaterial::CTexEnv      <a class="code" href="classNL3D_1_1CDriverGL.html#z407_9">_LightMapLastStageEnv</a>;
00698 
00699         <font class="comment">// Caching</font>
<a name="l00700"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z407_10">00700</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z407_10">_LastVertexSetupIsLightMap</a>;
<a name="l00701"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z407_11">00701</a>         sint8                   <a class="code" href="classNL3D_1_1CDriverGL.html#z407_11">_LightMapUVMap</a>[<a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>];
00702 
00703         <font class="comment">// restore std vertex Setup.</font>
00704         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z407_4">resetLightMapVertexSetup</a>();
00705 
00706         <font class="comment">// @}</font>
00707 
00709         <font class="comment">// @{</font>
00710         sint                    <a class="code" href="classNL3D_1_1CDriverGL.html#z408_0">beginSpecularMultiPass</a>();
00711         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z408_1">setupSpecularPass</a>(uint pass);
00712         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z408_2">endSpecularMultiPass</a>();
00713         <font class="comment">// @}</font>
00714                 
00716         <font class="comment">// @{</font>
00717         <font class="comment">// per pixel lighting with specular</font>
00718         sint                    <a class="code" href="classNL3D_1_1CDriverGL.html#z409_2">beginPPLMultiPass</a>();
00719         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z409_3">setupPPLPass</a>(uint pass);
00720         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z409_4">endPPLMultiPass</a>();
00721 
00722         <font class="comment">// per pixel lighting, no specular</font>
00723         sint                    <a class="code" href="classNL3D_1_1CDriverGL.html#z409_5">beginPPLNoSpecMultiPass</a>();
00724         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z409_6">setupPPLNoSpecPass</a>(uint pass);
00725         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z409_7">endPPLNoSpecMultiPass</a>();
00726 
<a name="l00727"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z409_0">00727</a>         <font class="keyword">typedef</font> <a class="code" href="classNLMISC_1_1CSmartPtr.html">NLMISC::CSmartPtr&lt;CTextureCube&gt;</a> <a class="code" href="classNLMISC_1_1CSmartPtr.html">TSPTextureCube</a>; 
<a name="l00728"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z409_1">00728</a>         <font class="keyword">typedef</font> std::vector&lt;TSPTextureCube&gt; <a class="code" href="classNL3D_1_1CDriverGL.html#z409_1">TTexCubeVect</a>;       
<a name="l00729"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z409_10">00729</a>         <a class="code" href="classNL3D_1_1CDriverGL.html#z409_1">TTexCubeVect</a>   <a class="code" href="classNL3D_1_1CDriverGL.html#z409_10">_SpecularTextureCubes</a>; <font class="comment">// the cube maps used to compute the specular lighting.</font>
00730                 
00731 
00733         CTextureCube   *<a class="code" href="classNL3D_1_1CDriverGL.html#z409_8">getSpecularCubeMap</a>(uint exp);
00734 
00735         <font class="comment">// get (and if necessary, build) the cube map used for diffuse lighting</font>
<a name="l00736"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z409_9">00736</a>         CTextureCube   *<a class="code" href="classNL3D_1_1CDriverGL.html#z409_9">getDiffuseCubeMap</a>() { <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverGL.html#z409_8">getSpecularCubeMap</a>(1); }
00737 
00738 
00739 
00740         <font class="comment">// @}</font>
00741 
00743         <font class="comment">// @{</font>
00744         <font class="comment">/*sint                  beginCausticsMultiPass(const CMaterial &amp;mat);</font>
00745 <font class="comment">        void                    setupCausticsPass(const CMaterial &amp;mat, uint pass);</font>
00746 <font class="comment">        void                    endCausticsMultiPass(const CMaterial &amp;mat);*/</font>
00747         <font class="comment">// @}</font>
00748 
00750         sint                    <a class="code" href="classNL3D_1_1CDriverGL.html#c15">beginCloudMultiPass</a> ();
00751         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c16">setupCloudPass</a> (uint pass);
00752         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c17">endCloudMultiPass</a> ();
00753         <font class="comment">// @}</font>
00754 
00755 
00757         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c18">setupGlArrays</a>(CVertexBufferInfo &amp;vb);
00758 
00760         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c19">setupGlArraysStd</a>(CVertexBufferInfo &amp;vb);
00761         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c20">setupGlArraysForNVVertexProgram</a>(CVertexBufferInfo &amp;vb);
00762         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c21">setupGlArraysForEXTVertexShader</a>(CVertexBufferInfo &amp;vb);
00763         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c22">toggleGlArraysForNVVertexProgram</a>();
00764         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c23">toggleGlArraysForEXTVertexShader</a>();
00765 
<a name="l00767"></a><a class="code" href="classNL3D_1_1CDriverGL.html#c24">00767</a>         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c24">enableGlNormalize</a>(<font class="keywordtype">bool</font> normalize)
00768         {
00769                 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CDriverGL.html#o23">_CurrentGlNormalize</a>!=normalize)
00770                 {
00771                         <a class="code" href="classNL3D_1_1CDriverGL.html#o23">_CurrentGlNormalize</a>= normalize;
00772                         <font class="keywordflow">if</font>(normalize)
00773                                 glEnable(GL_NORMALIZE);
00774                         <font class="keywordflow">else</font>
00775                                 glDisable(GL_NORMALIZE);
00776                 }
00777         }
00778 
00779         <font class="comment">// refresh matrixes and lights.</font>
<a name="l00780"></a><a class="code" href="classNL3D_1_1CDriverGL.html#c25">00780</a>         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c25">refreshRenderSetup</a>()
00781         {
00782                 <font class="comment">// check if something to change.</font>
00783                 <font class="keywordflow">if</font>(_RenderSetupDirty)
00784                 {
00785                         <a class="code" href="classNL3D_1_1CDriverGL.html#c26">doRefreshRenderSetup</a>();
00786                 }
00787         }
00788         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c26">doRefreshRenderSetup</a>();
00789 
00790 
00792         <font class="comment">// @{</font>
<a name="l00793"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_2">00793</a>         CPtrSet&lt;IVertexBufferHardGL&gt;    <a class="code" href="classNL3D_1_1CDriverGL.html#z411_2">_VertexBufferHardSet</a>;
<a name="l00794"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_12">00794</a>         <font class="keyword">friend</font> <font class="keyword">class                                    </font><a class="code" href="classNL3D_1_1CDriverGL.html#z411_12">CVertexArrayRangeNVidia</a>;
<a name="l00795"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_13">00795</a>         <font class="keyword">friend</font> <font class="keyword">class                                    </font><a class="code" href="classNL3D_1_1CDriverGL.html#z411_13">CVertexBufferHardGLNVidia</a>;
<a name="l00796"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_14">00796</a>         <font class="keyword">friend</font> <font class="keyword">class                                    </font><a class="code" href="classNL3D_1_1CDriverGL.html#z411_14">CVertexArrayRangeATI</a>;
<a name="l00797"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_15">00797</a>         <font class="keyword">friend</font> <font class="keyword">class                                    </font><a class="code" href="classNL3D_1_1CDriverGL.html#z411_15">CVertexBufferHardGLATI</a>;
00798         <font class="comment">// The VertexArrayRange activated.</font>
<a name="l00799"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_3">00799</a>         IVertexArrayRange                               *<a class="code" href="classNL3D_1_1CDriverGL.html#z411_3">_CurrentVertexArrayRange</a>;
00800         <font class="comment">// The VertexBufferHardGL activated.</font>
<a name="l00801"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_4">00801</a>         IVertexBufferHardGL                             *<a class="code" href="classNL3D_1_1CDriverGL.html#z411_4">_CurrentVertexBufferHard</a>;
00802         <font class="comment">// current setup passed to nglVertexArrayRangeNV()</font>
<a name="l00803"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_5">00803</a>         <font class="keywordtype">void</font>                                                    *<a class="code" href="classNL3D_1_1CDriverGL.html#z411_5">_NVCurrentVARPtr</a>;
<a name="l00804"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_6">00804</a>         uint32                                                  <a class="code" href="classNL3D_1_1CDriverGL.html#z411_6">_NVCurrentVARSize</a>;
00805 
00806         <font class="comment">// Info got from ATI or NVidia extension.</font>
<a name="l00807"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_7">00807</a>         <font class="keywordtype">bool</font>                                                    <a class="code" href="classNL3D_1_1CDriverGL.html#z411_7">_SupportVBHard</a>;
<a name="l00808"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_8">00808</a>         <font class="keywordtype">bool</font>                                                    <a class="code" href="classNL3D_1_1CDriverGL.html#z411_8">_SlowUnlockVBHard</a>;
<a name="l00809"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_9">00809</a>         uint32                                                  <a class="code" href="classNL3D_1_1CDriverGL.html#z411_9">_MaxVerticesByVBHard</a>;
00810 
00811         <font class="comment">// The AGP VertexArrayRange.</font>
<a name="l00812"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_10">00812</a>         IVertexArrayRange                               *<a class="code" href="classNL3D_1_1CDriverGL.html#z411_10">_AGPVertexArrayRange</a>;
00813         <font class="comment">// The VRAM VertexArrayRange.</font>
<a name="l00814"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z411_11">00814</a>         IVertexArrayRange                               *<a class="code" href="classNL3D_1_1CDriverGL.html#z411_11">_VRAMVertexArrayRange</a>;
00815 
00816 
00817         <font class="keywordtype">void</font>                                                    <a class="code" href="classNL3D_1_1CDriverGL.html#z411_0">resetVertexArrayRange</a>();
00818 
00819         <font class="keywordtype">void</font>                                                    <a class="code" href="classNL3D_1_1CDriverGL.html#z411_1">fenceOnCurVBHardIfNeeded</a>(IVertexBufferHardGL *newVBHard);
00820 
00821 
00822         <font class="comment">// @}</font>
00823 
00824 
00826         <font class="comment">// @{</font>
<a name="l00827"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z412_1">00827</a>         CPrimitiveProfile                                                                       <a class="code" href="classNL3D_1_1CDriverGL.html#z412_1">_PrimitiveProfileIn</a>;
<a name="l00828"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z412_2">00828</a>         CPrimitiveProfile                                                                       <a class="code" href="classNL3D_1_1CDriverGL.html#z412_2">_PrimitiveProfileOut</a>;
<a name="l00829"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z412_3">00829</a>         uint32                                                                                          <a class="code" href="classNL3D_1_1CDriverGL.html#z412_3">_AllocatedTextureMemory</a>;
<a name="l00830"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z412_4">00830</a>         uint32                                                                                          <a class="code" href="classNL3D_1_1CDriverGL.html#z412_4">_NbSetupMaterialCall</a>;
<a name="l00831"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z412_5">00831</a>         uint32                                                                                          <a class="code" href="classNL3D_1_1CDriverGL.html#z412_5">_NbSetupModelMatrixCall</a>;
<a name="l00832"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z412_6">00832</a>         <font class="keywordtype">bool</font>                                                                                            <a class="code" href="classNL3D_1_1CDriverGL.html#z412_6">_SumTextureMemoryUsed</a>;
<a name="l00833"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z412_7">00833</a>         std::set&lt;CTextureDrvInfosGL*&gt;                                           <a class="code" href="classNL3D_1_1CDriverGL.html#z412_7">_TextureUsed</a>;
00834         uint                                                    <a class="code" href="classNL3D_1_1CDriverGL.html#z412_0">computeMipMapMemoryUsage</a>(uint <a class="code" href="driver__opengl__extension__def_8h.html#a367">w</a>, uint h, GLint glfmt) <font class="keyword">const</font>;
00835         <font class="comment">// @}</font>
00836 
00838         <font class="comment">// @{</font>
00839 
00840         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z413_0">isVertexProgramSupported</a> () <font class="keyword">const</font>;
00841         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z413_1">isVertexProgramEmulated</a> () <font class="keyword">const</font>;
00842         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z413_2">activeVertexProgram</a> (CVertexProgram *<a class="code" href="driver__opengl__extension__def_8h.html#a360">program</a>);
00843         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z413_3">setConstant</a> (uint <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>, <font class="keywordtype">float</font>, <font class="keywordtype">float</font>, <font class="keywordtype">float</font>, <font class="keywordtype">float</font>);
00844         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z413_3">setConstant</a> (uint <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>, <font class="keywordtype">double</font>, <font class="keywordtype">double</font>, <font class="keywordtype">double</font>, <font class="keywordtype">double</font>);
00845         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z413_3">setConstant</a> (uint indexStart, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVector.html">NLMISC::CVector</a>&amp; <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>);
00846         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z413_3">setConstant</a> (uint indexStart, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a>&amp; <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>);   
00847         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z413_3">setConstant</a> (uint <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>, uint <a class="code" href="driver__opengl__extension__def_8h.html#a410">num</a>, <font class="keyword">const</font> <font class="keywordtype">float</font> *<a class="code" href="driver__opengl__extension__def_8h.html#a409">src</a>);   
00848         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z413_3">setConstant</a> (uint <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>, uint <a class="code" href="driver__opengl__extension__def_8h.html#a410">num</a>, <font class="keyword">const</font> <font class="keywordtype">double</font> *<a class="code" href="driver__opengl__extension__def_8h.html#a409">src</a>);
00849         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z413_9">setConstantMatrix</a> (uint <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>, IDriver::TMatrix <a class="code" href="driver__opengl__extension__def_8h.html#a370">matrix</a>, IDriver::TTransform <a class="code" href="driver__opengl__extension__def_8h.html#a371">transform</a>); 
00850         <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#z413_10">enableVertexProgramDoubleSidedColor</a>(<font class="keywordtype">bool</font> doubleSided);
00851         <font class="keywordtype">bool</font>                <a class="code" href="classNL3D_1_1CDriverGL.html#z413_11">supportVertexProgramDoubleSidedColor</a>() <font class="keyword">const</font>;
00852 
00853         
00854         <font class="comment">// @}</font>
00855 
00857         <font class="comment">// @{</font>
00858                 <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CDriverGL.html#z414_0">activeNVVertexProgram</a> (CVertexProgram *<a class="code" href="driver__opengl__extension__def_8h.html#a360">program</a>);
00859                 <font class="keywordtype">bool</font> <a class="code" href="classNL3D_1_1CDriverGL.html#z414_1">activeEXTVertexShader</a> (CVertexProgram *<a class="code" href="driver__opengl__extension__def_8h.html#a360">program</a>);           
00861 
00862 
00863 
00865         <font class="comment">// @{</font>
00867 <font class="comment">                CMaterial::TShader      getSupportedShader(CMaterial::TShader shader);</font>
00868         <font class="comment">// @}</font>
00869 
<a name="l00870"></a><a class="code" href="classNL3D_1_1CDriverGL.html#c27">00870</a>         <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CDriverGL.html#c27">isVertexProgramEnabled</a> ()<font class="keyword"> const</font>
00871 <font class="keyword">        </font>{
00872                 <font class="comment">// Don't use glIsEnabled, too slow.</font>
00873                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverGL.html#o24">_VertexProgramEnabled</a>;
00874         }
00875 
00876         <font class="comment">// Track state of activeVertexProgram()</font>
<a name="l00877"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o24">00877</a>         <font class="keywordtype">bool</font>                                                    <a class="code" href="classNL3D_1_1CDriverGL.html#o24">_VertexProgramEnabled</a>;
00878         <font class="comment">// Say if last setupGlArrays() was a VertexProgram setup.</font>
<a name="l00879"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o25">00879</a>         <font class="keywordtype">bool</font>                                                    <a class="code" href="classNL3D_1_1CDriverGL.html#o25">_LastSetupGLArrayVertexProgram</a>;
00880 
00881         <font class="comment">// The last vertex program that was setupped</font>
<a name="l00882"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o26">00882</a>         <a class="code" href="classNLMISC_1_1CRefPtr.html">NLMISC::CRefPtr&lt;CVertexProgram&gt;</a> <a class="code" href="classNL3D_1_1CDriverGL.html#o26">_LastSetuppedVP</a>;
00883 
<a name="l00884"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o27">00884</a>         <font class="keywordtype">bool</font>                                                    <a class="code" href="classNL3D_1_1CDriverGL.html#o27">_ForceDXTCCompression</a>;
<a name="l00886"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o28">00886</a>         uint                                                    <a class="code" href="classNL3D_1_1CDriverGL.html#o28">_ForceTextureResizePower</a>;
00887 
00888 
00889         <font class="comment">// user texture matrix</font>
<a name="l00890"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o29">00890</a>         <a class="code" href="classNLMISC_1_1CMatrix.html">NLMISC::CMatrix</a>         <a class="code" href="classNL3D_1_1CDriverGL.html#o29">_UserTexMat</a>[<a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>];
<a name="l00891"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o30">00891</a>         uint                            <a class="code" href="classNL3D_1_1CDriverGL.html#o30">_UserTexMatEnabled</a>; <font class="comment">// bitm ask for user texture coords</font>
00892         <font class="comment">//NLMISC::CMatrix               _UserTexMat[IDRV_MAT_MAXTEXTURES];</font>
00893 
00894         <font class="comment">// Static const</font>
00895         <font class="keyword">static</font> <font class="keyword">const</font> uint <a class="code" href="classNL3D_1_1CDriverGL.html#r1">NumCoordinatesType</a>[CVertexBuffer::NumType];
00896         <font class="keyword">static</font> <font class="keyword">const</font> uint <a class="code" href="classNL3D_1_1CDriverGL.html#r2">GLType</a>[CVertexBuffer::NumType];
00897         <font class="keyword">static</font> <font class="keyword">const</font> uint <a class="code" href="classNL3D_1_1CDriverGL.html#r3">GLVertexAttribIndex</a>[CVertexBuffer::NumValue];
00898         <font class="keyword">static</font> <font class="keyword">const</font> uint <a class="code" href="classNL3D_1_1CDriverGL.html#r4">GLMatrix</a>[IDriver::NumMatrix];
00899         <font class="keyword">static</font> <font class="keyword">const</font> uint <a class="code" href="classNL3D_1_1CDriverGL.html#r5">GLTransform</a>[IDriver::NumTransform];
00900 
00902         <font class="comment">// @{</font>
<a name="l00903"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z416_0">00903</a>                 <a class="code" href="classNLMISC_1_1CSmartPtr.html">NLMISC::CSmartPtr&lt;CTextureCube&gt;</a> <a class="code" href="classNL3D_1_1CDriverGL.html#z416_0">_CausticCubeMap</a>; <font class="comment">// a cube map used for the rendering of caustics</font>
00904                 <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="classNL3D_1_1CDriverGL.html#z416_1">initCausticCubeMap</a>();
00905         <font class="comment">// @}</font>
00906 
<a name="l00908"></a><a class="code" href="classNL3D_1_1CDriverGL.html#c28">00908</a>         sint                    <a class="code" href="classNL3D_1_1CDriverGL.html#c28">inlGetNumTextStages</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CDriverGL.html#z403_0">_Extensions</a>.NbTextureStages;}
00909 
00910 
<a name="l00911"></a><a class="code" href="classNL3D_1_1CDriverGL.html#o31">00911</a>         <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a>                                   <a class="code" href="classNL3D_1_1CDriverGL.html#o31">_CurrentBlendConstantColor</a>;
00912 
00914         <font class="comment">// @{</font>
00915                         <font class="comment">// Variants offset used for : </font>
00916                         <font class="comment">// Secondary color</font>
00917                         <font class="comment">// Fog Coords</font>
00918                         <font class="comment">// Skin Weight</font>
00919                         <font class="comment">// Palette Skin</font>
00920                         <font class="comment">// This mean that they must have 4 components</font>
00921                         <font class="keyword">public</font>:
<a name="l00922"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z417_0">00922</a>                                 <font class="keyword">enum</font> <a class="code" href="classNL3D_1_1CDriverGL.html#z417_0">EEVSVariants</a> { <a class="code" href="classNL3D_1_1CDriverGL.html#z417_0s1">EVSSecondaryColorVariant</a> = 0, <a class="code" href="classNL3D_1_1CDriverGL.html#z417_0s2">EVSFogCoordsVariant</a> = 1, <a class="code" href="classNL3D_1_1CDriverGL.html#z417_0s3">EVSSkinWeightVariant</a> = 2, <a class="code" href="classNL3D_1_1CDriverGL.html#z417_0s4">EVSPaletteSkinVariant</a> = 3, <a class="code" href="classNL3D_1_1CDriverGL.html#z417_0s5">EVSNumVariants</a> };
00923                         <font class="keyword">private</font>:
00924                         <font class="comment">// Handle for standard gl arrays</font>
<a name="l00925"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z417_2">00925</a>                         <a class="code" href="driver__opengl__extension__def_8h.html#a423">GLuint</a> <a class="code" href="classNL3D_1_1CDriverGL.html#z417_2">_EVSPositionHandle</a>;
<a name="l00926"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z417_3">00926</a>                         <a class="code" href="driver__opengl__extension__def_8h.html#a423">GLuint</a> <a class="code" href="classNL3D_1_1CDriverGL.html#z417_3">_EVSNormalHandle</a>;
<a name="l00927"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z417_4">00927</a>                         <a class="code" href="driver__opengl__extension__def_8h.html#a423">GLuint</a> <a class="code" href="classNL3D_1_1CDriverGL.html#z417_4">_EVSColorHandle</a>;                 
<a name="l00928"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z417_5">00928</a>                         <a class="code" href="driver__opengl__extension__def_8h.html#a423">GLuint</a> <a class="code" href="classNL3D_1_1CDriverGL.html#z417_5">_EVSTexHandle</a>[8];
00929                         <font class="comment">// Handle of the first constant c[0]. In vertex program wa have 96 constant c[0] .. c[95]</font>
<a name="l00930"></a><a class="code" href="classNL3D_1_1CDriverGL.html#z417_6">00930</a>                         <a class="code" href="driver__opengl__extension__def_8h.html#a423">GLuint</a> <a class="code" href="classNL3D_1_1CDriverGL.html#z417_6">_EVSConstantHandle</a>;
00931                         <font class="comment">// </font>
00932                         <font class="keywordtype">bool</font>   <a class="code" href="classNL3D_1_1CDriverGL.html#z417_1">setupEXTVertexShader</a>(<font class="keyword">const</font> <a class="code" href="classCVPParser.html#s0">CVPParser::TProgram</a> &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a360">program</a>, <a class="code" href="driver__opengl__extension__def_8h.html#a423">GLuint</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>, uint variants[<a class="code" href="classNL3D_1_1CDriverGL.html#z417_0s5">EVSNumVariants</a>], uint16 &amp;usedInputRegisters);
00933                         <font class="comment">//                      </font>
00934         <font class="comment">// @}</font>
00935 
00936         <font class="comment">// init EMBM settings (set each stage to modify the next)</font>
00937         <font class="keywordtype">void</font>    <a class="code" href="classNL3D_1_1CDriverGL.html#c29">initEMBM</a>();
00938 
00939         <font class="comment">// Monitor color parameters backup</font>
00940 <font class="preprocessor">#ifdef WIN32</font>
00941 <font class="preprocessor"></font>        <font class="keywordtype">bool</font>                                                    _NeedToRestaureGammaRamp;
00942         uint16                                                  _GammaRampBackuped[3*256];
00943 <font class="preprocessor">#endif</font>
00944 <font class="preprocessor"></font>};
00945 
00946 
00947 <font class="comment">// ***************************************************************************</font>
<a name="l00948"></a><a class="code" href="classNL3D_1_1CVertexProgamDrvInfosGL.html">00948</a> <font class="keyword">class </font>CVertexProgamDrvInfosGL : <font class="keyword">public</font> IVertexProgramDrvInfos
00949 {
00950 <font class="keyword">public</font>:
00951         <font class="comment">// The GL Id.</font>
<a name="l00952"></a><a class="code" href="classNL3D_1_1CVertexProgamDrvInfosGL.html#m0">00952</a>         <a class="code" href="driver__opengl__extension__def_8h.html#a423">GLuint</a>                                  <a class="code" href="classNL3D_1_1CVertexProgamDrvInfosGL.html#m0">ID</a>;
00953 
<a name="l00957"></a><a class="code" href="classNL3D_1_1CVertexProgamDrvInfosGL.html#m1">00957</a>         <a class="code" href="driver__opengl__extension__def_8h.html#a423">GLuint</a>                                  <a class="code" href="classNL3D_1_1CVertexProgamDrvInfosGL.html#m1">Variants</a>[CDriverGL::EVSNumVariants];
<a name="l00962"></a><a class="code" href="classNL3D_1_1CVertexProgamDrvInfosGL.html#m2">00962</a>         uint16                                  <a class="code" href="classNL3D_1_1CVertexProgamDrvInfosGL.html#m2">UsedVertexComponents</a>;
00963 
00964 
00965         <font class="comment">// The gl id is auto created here.</font>
00966         <a class="code" href="classNL3D_1_1CVertexProgamDrvInfosGL.html#a0">CVertexProgamDrvInfosGL</a> (CDriverGL *drv, <a class="code" href="namespaceNL3D.html#a297">ItVtxPrgDrvInfoPtrList</a> it);
00967 };
00968 
00969 
00970 } <font class="comment">// NL3D</font>
00971 
00972 <font class="preprocessor">#endif // NL_OPENGL_H</font>
</pre></div>

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