aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03691.html
blob: 774c31e6547cca62d15edb8a87a21e65d424cbe9 (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>NeL: NL3D::CVertexArrayRangeNVidia class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex">  <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a>  | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>NL3D::CVertexArrayRangeNVidia Class Reference</h1><code>#include &lt;<a class="el" href="a05655.html">driver_opengl_vertex_buffer_hard.h</a>&gt;</code>
<p>
<p>Inheritance diagram for NL3D::CVertexArrayRangeNVidia:
<p><center><img src="a03691.png" usemap="#NL3D::CVertexArrayRangeNVidia_map" border="0" alt=""></center>
<map name="NL3D::CVertexArrayRangeNVidia_map">
<area href="a03689.html" alt="NL3D::IVertexArrayRange" shape="rect" coords="0,0,203,24">
</map>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Work only if ARRAY_RANGE_NV is enabled. else, only call to ctor/dtor/free() is valid. any call to <a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiad1">allocateVB()</a> will return NULL. 
<p>

<p>
Definition at line <a class="el" href="a05655.html#l00127">127</a> of file <a class="el" href="a05655.html">driver_opengl_vertex_buffer_hard.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiaa0">CVertexArrayRangeNVidia</a> (<a class="el" href="a02433.html">CDriverGL</a> *drv)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiaa1">disable</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">disable this VertexArrayRange. _Driver-&gt;_CurrentVertexArrayRange= NULL;  <a href="#NL3D_1_1CVertexArrayRangeNVidiaa1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiaa2">enable</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">active this VertexArrayRange as the current vertex array range used. no-op if already setup.  <a href="#NL3D_1_1CVertexArrayRangeNVidiaa2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiaa3">freeVB</a> (void *ptr)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">free a VB allocated with allocateVB. No-op if NULL.  <a href="#NL3D_1_1CVertexArrayRangeNVidiaa3"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Implementation</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiaz125_0">allocate</a> (<a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a04223.html#a587">size</a>, <a class="el" href="a02434.html#NL3D_1_1IDriverw39">IDriver::TVBHardType</a> vbType)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">allocate a vertex array sapce. false if error. must free before re-allocate.  <a href="#NL3D_1_1CVertexArrayRangeNVidiaz125_0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a03695.html">IVertexBufferHardGL</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiaz125_1">createVBHardGL</a> (<a class="el" href="a04558.html#a9">uint16</a> vertexFormat, const <a class="el" href="a04558.html#a7">uint8</a> *typeArray, <a class="el" href="a04558.html#a11">uint32</a> numVertices, const <a class="el" href="a04558.html#a7">uint8</a> *uvRouting)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">create a <a class="el" href="a03695.html">IVertexBufferHardGL</a>  <a href="#NL3D_1_1CVertexArrayRangeNVidiaz125_1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiaz125_2">free</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">free this space.  <a href="#NL3D_1_1CVertexArrayRangeNVidiaz125_2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiaz125_3">sizeAllocated</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return the size allocated. 0 if not allocated or failure  <a href="#NL3D_1_1CVertexArrayRangeNVidiaz125_3"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02433.html">CDriverGL</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03689.html#NL3D_1_1IVertexArrayRangep0">_Driver</a></td></tr>

<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiad0">allocated</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">true if allocated.  <a href="#NL3D_1_1CVertexArrayRangeNVidiad0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiad1">allocateVB</a> (<a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a04223.html#a587">size</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocate a small subset of the memory. NULL if not enough mem.  <a href="#NL3D_1_1CVertexArrayRangeNVidiad1"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02627.html">NLMISC::CHeapMemory</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar0">_HeapMemory</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar1">_VertexArrayPtr</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar2">_VertexArraySize</a></td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeNVidiaa0" doxytag="NL3D::CVertexArrayRangeNVidia::CVertexArrayRangeNVidia" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> NL3D::CVertexArrayRangeNVidia::CVertexArrayRangeNVidia </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a02433.html">CDriverGL</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>drv</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>

<p>
Definition at line <a class="el" href="a05654.html#l00093">93</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05655.html#l00158">_VertexArrayPtr</a>, and <a class="el" href="a05655.html#l00159">_VertexArraySize</a>.
<p>
<div class="fragment"><pre>00093                                                                : <a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangea3">IVertexArrayRange</a>(drv)
00094 {
00095         <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar1">_VertexArrayPtr</a>= NULL;
00096         <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar2">_VertexArraySize</a>= 0;
00097 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeNVidiaz125_0" doxytag="NL3D::CVertexArrayRangeNVidia::allocate" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool NL3D::CVertexArrayRangeNVidia::allocate </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>size</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02434.html#NL3D_1_1IDriverw39">IDriver::TVBHardType</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>vbType</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [virtual]</code></td>
        </tr>

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

<p>
allocate a vertex array sapce. false if error. must free before re-allocate. 
<p>

<p>
Implements <a class="el" href="a03689.html#NL3D_1_1IVertexArrayRangea0">NL3D::IVertexArrayRange</a>.
<p>
Definition at line <a class="el" href="a05654.html#l00101">101</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05655.html#l00162">_HeapMemory</a>, <a class="el" href="a05655.html#l00158">_VertexArrayPtr</a>, <a class="el" href="a05655.html#l00159">_VertexArraySize</a>, <a class="el" href="a05781.html#l00064">NLMISC::CHeapMemory::initHeap()</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05646.html#l00645">size</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
<div class="fragment"><pre>00102 {
00103         <a class="code" href="a04199.html#a6">nlassert</a>(_VertexArrayPtr==NULL);
00104 
00105 <span class="preprocessor">#ifdef  NL_OS_WINDOWS</span>
00106 <span class="preprocessor"></span>        <span class="comment">// try to allocate AGP or VRAM data.</span>
00107         <span class="keywordflow">switch</span>(vbType)
00108         {
00109         <span class="keywordflow">case</span> IDriver::VBHardAGP: 
00110                 <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar1">_VertexArrayPtr</a>= wglAllocateMemoryNV(size, 0, 0, 0.5f);
00111                 <span class="keywordflow">break</span>;
00112         <span class="keywordflow">case</span> IDriver::VBHardVRAM:
00113                 <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar1">_VertexArrayPtr</a>= wglAllocateMemoryNV(size, 0, 0, 1.0f);
00114                 <span class="keywordflow">break</span>;
00115         };
00116 <span class="preprocessor">#endif  // NL_OS_WINDOWS</span>
00117 <span class="preprocessor"></span>
00118 
00119         <span class="comment">// init the allocator.</span>
00120         <span class="keywordflow">if</span>(<a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar1">_VertexArrayPtr</a>)
00121         {
00122                 <span class="comment">/* Init with an alignment of 8. Not sure it is usefull, but GDC01_Performance.pdf papers talks about</span>
00123 <span class="comment">                  "Data arrays must be 8-byte aligned". Don't know what "Data" is.</span>
00124 <span class="comment">                */</span>
00125                 <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar0">_HeapMemory</a>.<a class="code" href="a02627.html#NLMISC_1_1CHeapMemorya5">initHeap</a>(_VertexArrayPtr, size, 8);
00126 
00127                 <span class="comment">// set the size</span>
00128                 <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar2">_VertexArraySize</a>= <a class="code" href="a04223.html#a587">size</a>;
00129         }
00130 
00131 
00132         <span class="keywordflow">return</span> <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar1">_VertexArrayPtr</a>!=NULL;
00133 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeNVidiad0" doxytag="NL3D::CVertexArrayRangeNVidia::allocated" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool NL3D::CVertexArrayRangeNVidia::allocated </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline, private]</code></td>
        </tr>

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

<p>
true if allocated. 
<p>

<p>
Definition at line <a class="el" href="a05655.html#l00165">165</a> of file <a class="el" href="a05655.html">driver_opengl_vertex_buffer_hard.h</a>.
<p>
References <a class="el" href="a05655.html#l00158">_VertexArrayPtr</a>.
<p>
Referenced by <a class="el" href="a05654.html#l00219">createVBHardGL()</a>.
<p>
<div class="fragment"><pre>00165 {<span class="keywordflow">return</span> <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar1">_VertexArrayPtr</a>!=NULL;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeNVidiad1" doxytag="NL3D::CVertexArrayRangeNVidia::allocateVB" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void * NL3D::CVertexArrayRangeNVidia::allocateVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>size</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>

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

<p>
Allocate a small subset of the memory. NULL if not enough mem. 
<p>

<p>
Definition at line <a class="el" href="a05654.html#l00205">205</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05655.html#l00162">_HeapMemory</a>, <a class="el" href="a05781.html#l00118">NLMISC::CHeapMemory::allocate()</a>, <a class="el" href="a05646.html#l00645">size</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
Referenced by <a class="el" href="a05654.html#l00219">createVBHardGL()</a>.
<p>
<div class="fragment"><pre>00206 {
00207         <span class="keywordflow">return</span> <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar0">_HeapMemory</a>.<a class="code" href="a02627.html#NLMISC_1_1CHeapMemorya0">allocate</a>(size);
00208 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeNVidiaz125_1" doxytag="NL3D::CVertexArrayRangeNVidia::createVBHardGL" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03695.html">IVertexBufferHardGL</a> * NL3D::CVertexArrayRangeNVidia::createVBHardGL </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>vertexFormat</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>typeArray</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>numVertices</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a04558.html#a7">uint8</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>uvRouting</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [virtual]</code></td>
        </tr>

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

<p>
create a <a class="el" href="a03695.html">IVertexBufferHardGL</a> 
<p>

<p>
Implements <a class="el" href="a03689.html#NL3D_1_1IVertexArrayRangea1">NL3D::IVertexArrayRange</a>.
<p>
Definition at line <a class="el" href="a05654.html#l00219">219</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05655.html#l00165">allocated()</a>, <a class="el" href="a05654.html#l00205">allocateVB()</a>, <a class="el" href="a06713.html#l00054">NL3D::IVertexBufferHard::getNumVertices()</a>, <a class="el" href="a06713.html#l00053">NL3D::IVertexBufferHard::getVertexSize()</a>, <a class="el" href="a05655.html#l00104">NL3D::IVertexBufferHardGL::initFormat()</a>, <a class="el" href="a05654.html#l00295">NL3D::CVertexBufferHardGLNVidia::initGL()</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a05981.html#l00098">uint16</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
<div class="fragment"><pre>00220 {
00221         <span class="comment">// create a NVidia VBHard</span>
00222         CVertexBufferHardGLNVidia       *newVbHard= <span class="keyword">new</span> CVertexBufferHardGLNVidia(_Driver);
00223 
00224         <span class="comment">// Init the format of the VB.</span>
00225         newVbHard-&gt;initFormat(vertexFormat, typeArray, numVertices, uvRouting);
00226 
00227         <span class="comment">// compute size to allocate.</span>
00228         <a class="code" href="a04558.html#a11">uint32</a>  <a class="code" href="a04223.html#a587">size</a>= newVbHard-&gt;getVertexSize() * newVbHard-&gt;getNumVertices();
00229 
00230         <span class="comment">// try to allocate</span>
00231         <span class="keywordtype">void</span>    *vertexPtr;
00232         <span class="keywordflow">if</span>( <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiad0">allocated</a>() )
00233         {
00234                  vertexPtr= <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiad1">allocateVB</a>(size);
00235         }
00236 
00237         <span class="comment">// If allocation fails.</span>
00238         <span class="keywordflow">if</span>( !vertexPtr )
00239         {
00240                 <span class="comment">// just destroy this object (no free()).</span>
00241                 <span class="keyword">delete</span> newVbHard;
00242                 <span class="keywordflow">return</span> NULL;
00243         }
00244         <span class="keywordflow">else</span>
00245         {
00246                 <span class="comment">// Ok, setup, and allocate the fence.</span>
00247                 newVbHard-&gt;initGL(<span class="keyword">this</span>, vertexPtr);
00248                 <span class="keywordflow">return</span> newVbHard;
00249         }
00250 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeNVidiaa1" doxytag="NL3D::CVertexArrayRangeNVidia::disable" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CVertexArrayRangeNVidia::disable </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>
disable this VertexArrayRange. _Driver-&gt;_CurrentVertexArrayRange= NULL; 
<p>

<p>
Definition at line <a class="el" href="a05654.html#l00191">191</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05643.html#l00887">NL3D::CDriverGL::_CurrentVertexArrayRange</a>, <a class="el" href="a05643.html#l00564">NL3D::CDriverGL::_Extensions</a>, and <a class="el" href="a05645.html#l00092">NL3D::CGlExtensions::NVStateVARWithoutFlush</a>.
<p>
Referenced by <a class="el" href="a05654.html#l00366">NL3D::CVertexBufferHardGLNVidia::disable()</a>.
<p>
<div class="fragment"><pre>00192 {
00193         <span class="comment">// if not already disabled.</span>
00194         <span class="keywordflow">if</span>(<a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangep0">_Driver</a>-&gt;_CurrentVertexArrayRange!=NULL)
00195         {
00196                 <span class="comment">// just disable the state, don't change VAR ptr setup.</span>
00197                 <span class="comment">// NB: flush is unesufull, so don't flush if extension is OK</span>
00198                 glDisableClientState(<a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangep0">_Driver</a>-&gt;_Extensions.NVStateVARWithoutFlush);
00199                 <a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangep0">_Driver</a>-&gt;_CurrentVertexArrayRange= NULL;
00200         }
00201 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeNVidiaa2" doxytag="NL3D::CVertexArrayRangeNVidia::enable" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CVertexArrayRangeNVidia::enable </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>
active this VertexArrayRange as the current vertex array range used. no-op if already setup. 
<p>

<p>
Definition at line <a class="el" href="a05654.html#l00166">166</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05643.html#l00887">NL3D::CDriverGL::_CurrentVertexArrayRange</a>, <a class="el" href="a05643.html#l00564">NL3D::CDriverGL::_Extensions</a>, <a class="el" href="a05643.html#l00891">NL3D::CDriverGL::_NVCurrentVARPtr</a>, <a class="el" href="a05643.html#l00892">NL3D::CDriverGL::_NVCurrentVARSize</a>, <a class="el" href="a05655.html#l00158">_VertexArrayPtr</a>, <a class="el" href="a05655.html#l00159">_VertexArraySize</a>, <a class="el" href="a05645.html#l00241">nglVertexArrayRangeNV</a>, and <a class="el" href="a05645.html#l00092">NL3D::CGlExtensions::NVStateVARWithoutFlush</a>.
<p>
Referenced by <a class="el" href="a05654.html#l00354">NL3D::CVertexBufferHardGLNVidia::enable()</a>.
<p>
<div class="fragment"><pre>00167 {
00168         <span class="comment">// if not already enabled.</span>
00169         <span class="keywordflow">if</span>(<a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangep0">_Driver</a>-&gt;_CurrentVertexArrayRange!=<span class="keyword">this</span>)
00170         {
00171                 <span class="comment">// Setup the ptrs only if differnets from last time (may rarely happens)</span>
00172                 <span class="keywordflow">if</span>( <a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangep0">_Driver</a>-&gt;_NVCurrentVARSize != <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar2">_VertexArraySize</a> || <a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangep0">_Driver</a>-&gt;_NVCurrentVARPtr != <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar1">_VertexArrayPtr</a>)
00173                 {
00174                         <span class="comment">// Yoyo: fucking NVidia Bug ?? must do this strange thing, this ensure that it is correclty setuped.</span>
00175                         glFinish();
00176                         <a class="code" href="a04222.html#a42">nglVertexArrayRangeNV</a>(_VertexArraySize, _VertexArrayPtr);
00177                         glEnableClientState(GL_VERTEX_ARRAY_RANGE_NV);
00178                         glVertexPointer(3,GL_FLOAT, 0, _VertexArrayPtr);
00179                         <span class="comment">// cache.</span>
00180                         <a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangep0">_Driver</a>-&gt;_NVCurrentVARSize= <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar2">_VertexArraySize</a>;
00181                         <a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangep0">_Driver</a>-&gt;_NVCurrentVARPtr= <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar1">_VertexArrayPtr</a>;
00182                 }
00183                 <span class="comment">// enable VAR. NB: flush is unesufull, so don't flush if extension is OK</span>
00184                 glEnableClientState(<a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangep0">_Driver</a>-&gt;_Extensions.NVStateVARWithoutFlush);
00185                 <a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangep0">_Driver</a>-&gt;_CurrentVertexArrayRange= <span class="keyword">this</span>;
00186         }
00187 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeNVidiaz125_2" doxytag="NL3D::CVertexArrayRangeNVidia::free" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CVertexArrayRangeNVidia::free </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

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

<p>
free this space. 
<p>

<p>
Implements <a class="el" href="a03689.html#NL3D_1_1IVertexArrayRangea2">NL3D::IVertexArrayRange</a>.
<p>
Definition at line <a class="el" href="a05654.html#l00144">144</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05655.html#l00162">_HeapMemory</a>, <a class="el" href="a05655.html#l00158">_VertexArrayPtr</a>, <a class="el" href="a05655.html#l00159">_VertexArraySize</a>, and <a class="el" href="a05781.html#l00052">NLMISC::CHeapMemory::reset()</a>.
<p>
<div class="fragment"><pre>00145 {
00146         <span class="comment">// release the ptr.</span>
00147         <span class="keywordflow">if</span>(<a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar1">_VertexArrayPtr</a>)
00148         {
00149                 <span class="comment">// reset the allocator.</span>
00150                 <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar0">_HeapMemory</a>.<a class="code" href="a02627.html#NLMISC_1_1CHeapMemorya6">reset</a>();
00151 
00152 
00153                 <span class="comment">// Free special memory.</span>
00154 <span class="preprocessor">#ifdef  NL_OS_WINDOWS</span>
00155 <span class="preprocessor"></span>                wglFreeMemoryNV(_VertexArrayPtr);
00156 <span class="preprocessor">#endif  // NL_OS_WINDOWS</span>
00157 <span class="preprocessor"></span>
00158 
00159                 <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar1">_VertexArrayPtr</a>= NULL;
00160                 <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar2">_VertexArraySize</a>= 0;
00161         }
00162 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeNVidiaa3" doxytag="NL3D::CVertexArrayRangeNVidia::freeVB" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CVertexArrayRangeNVidia::freeVB </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ptr</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>
free a VB allocated with allocateVB. No-op if NULL. 
<p>

<p>
Definition at line <a class="el" href="a05654.html#l00212">212</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05655.html#l00162">_HeapMemory</a>, and <a class="el" href="a05781.html#l00173">NLMISC::CHeapMemory::free()</a>.
<p>
Referenced by <a class="el" href="a05654.html#l00276">NL3D::CVertexBufferHardGLNVidia::~CVertexBufferHardGLNVidia()</a>.
<p>
<div class="fragment"><pre>00213 {
00214         <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar0">_HeapMemory</a>.<a class="code" href="a02627.html#NLMISC_1_1CHeapMemorya2">free</a>(ptr);
00215 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeNVidiaz125_3" doxytag="NL3D::CVertexArrayRangeNVidia::sizeAllocated" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NL3D::CVertexArrayRangeNVidia::sizeAllocated </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [virtual]</code></td>
        </tr>

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

<p>
return the size allocated. 0 if not allocated or failure 
<p>

<p>
Implements <a class="el" href="a03689.html#NL3D_1_1IVertexArrayRangea4">NL3D::IVertexArrayRange</a>.
<p>
Definition at line <a class="el" href="a05654.html#l00137">137</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05655.html#l00159">_VertexArraySize</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00138 {
00139         <span class="keywordflow">return</span> <a class="code" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar2">_VertexArraySize</a>;
00140 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NL3D_1_1IVertexArrayRangep0" doxytag="NL3D::CVertexArrayRangeNVidia::_Driver" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a02433.html">CDriverGL</a>* <a class="el" href="a03689.html#NL3D_1_1IVertexArrayRangep0">NL3D::IVertexArrayRange::_Driver</a><code> [protected, inherited]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05655.html#l00069">69</a> of file <a class="el" href="a05655.html">driver_opengl_vertex_buffer_hard.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeNVidiar0" doxytag="NL3D::CVertexArrayRangeNVidia::_HeapMemory" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a02627.html">NLMISC::CHeapMemory</a> <a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar0">NL3D::CVertexArrayRangeNVidia::_HeapMemory</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05655.html#l00162">162</a> of file <a class="el" href="a05655.html">driver_opengl_vertex_buffer_hard.h</a>.
<p>
Referenced by <a class="el" href="a05654.html#l00101">allocate()</a>, <a class="el" href="a05654.html#l00205">allocateVB()</a>, <a class="el" href="a05654.html#l00144">free()</a>, and <a class="el" href="a05654.html#l00212">freeVB()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeNVidiar1" doxytag="NL3D::CVertexArrayRangeNVidia::_VertexArrayPtr" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void* <a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar1">NL3D::CVertexArrayRangeNVidia::_VertexArrayPtr</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05655.html#l00158">158</a> of file <a class="el" href="a05655.html">driver_opengl_vertex_buffer_hard.h</a>.
<p>
Referenced by <a class="el" href="a05654.html#l00101">allocate()</a>, <a class="el" href="a05655.html#l00165">allocated()</a>, <a class="el" href="a05654.html#l00093">CVertexArrayRangeNVidia()</a>, <a class="el" href="a05654.html#l00166">enable()</a>, and <a class="el" href="a05654.html#l00144">free()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeNVidiar2" doxytag="NL3D::CVertexArrayRangeNVidia::_VertexArraySize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a03691.html#NL3D_1_1CVertexArrayRangeNVidiar2">NL3D::CVertexArrayRangeNVidia::_VertexArraySize</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05655.html#l00159">159</a> of file <a class="el" href="a05655.html">driver_opengl_vertex_buffer_hard.h</a>.
<p>
Referenced by <a class="el" href="a05654.html#l00101">allocate()</a>, <a class="el" href="a05654.html#l00093">CVertexArrayRangeNVidia()</a>, <a class="el" href="a05654.html#l00166">enable()</a>, <a class="el" href="a05654.html#l00144">free()</a>, and <a class="el" href="a05654.html#l00137">sizeAllocated()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a05655.html">driver_opengl_vertex_buffer_hard.h</a><li><a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 08:23:14 2004 for NeL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.6 </small></address>
</body>
</html>