aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03688.html
blob: df75d2502532c3c22a81969e5a6067e72ef23ba2 (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
<!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::CVertexArrayRangeATI 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::CVertexArrayRangeATI 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::CVertexArrayRangeATI:
<p><center><img src="a03688.png" usemap="#NL3D::CVertexArrayRangeATI_map" border="0" alt=""></center>
<map name="NL3D::CVertexArrayRangeATI_map">
<area href="a03689.html" alt="NL3D::IVertexArrayRange" shape="rect" coords="0,0,184,24">
</map>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Work only if ATIVertexArrayObject is enabled. else, only call to ctor/dtor/free() is valid. any call to <a class="el" href="a03688.html#NL3D_1_1CVertexArrayRangeATId0">allocateVB()</a> will return NULL. 
<p>

<p>
Definition at line <a class="el" href="a05655.html#l00250">250</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="a03688.html#NL3D_1_1CVertexArrayRangeATIa0">CVertexArrayRangeATI</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="a03688.html#NL3D_1_1CVertexArrayRangeATIa1">disable</a> ()</td></tr>

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

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03688.html#NL3D_1_1CVertexArrayRangeATIa3">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_1CVertexArrayRangeATIa3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03688.html#NL3D_1_1CVertexArrayRangeATIa4">getATIVertexObjectId</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get Handle of the ATI buffer.  <a href="#NL3D_1_1CVertexArrayRangeATIa4"></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="a03688.html#NL3D_1_1CVertexArrayRangeATIz129_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_1CVertexArrayRangeATIz129_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="a03688.html#NL3D_1_1CVertexArrayRangeATIz129_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_1CVertexArrayRangeATIz129_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="a03688.html#NL3D_1_1CVertexArrayRangeATIz129_2">free</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">free this space.  <a href="#NL3D_1_1CVertexArrayRangeATIz129_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="a03688.html#NL3D_1_1CVertexArrayRangeATIz129_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_1CVertexArrayRangeATIz129_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>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03688.html#NL3D_1_1CVertexArrayRangeATId0">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_1CVertexArrayRangeATId0"></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>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr0">_Allocated</a></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="a03688.html#NL3D_1_1CVertexArrayRangeATIr1">_HeapMemory</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="a03688.html#NL3D_1_1CVertexArrayRangeATIr2">_VertexArraySize</a></td></tr>

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

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeATIa0" doxytag="NL3D::CVertexArrayRangeATI::CVertexArrayRangeATI" ></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::CVertexArrayRangeATI::CVertexArrayRangeATI </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#l00434">434</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05655.html#l00289">_Allocated</a>, and <a class="el" href="a05655.html#l00288">_VertexObjectId</a>.
<p>
<div class="fragment"><pre>00434                                                          : <a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangea3">IVertexArrayRange</a>(drv)
00435 {
00436         <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr0">_Allocated</a>= <span class="keyword">false</span>;
00437         <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr3">_VertexObjectId</a>= 0;
00438         <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr2">_VertexArraySize</a>= 0;
00439 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeATIz129_0" doxytag="NL3D::CVertexArrayRangeATI::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::CVertexArrayRangeATI::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#l00441">441</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05655.html#l00289">_Allocated</a>, <a class="el" href="a05655.html#l00288">_VertexObjectId</a>, <a class="el" href="a05646.html#l00618">GL_DYNAMIC_ATI</a>, <a class="el" href="a05646.html#l00617">GL_STATIC_ATI</a>, <a class="el" href="a05781.html#l00064">NLMISC::CHeapMemory::initHeap()</a>, <a class="el" href="a05645.html#l00407">nglIsObjectBufferATI</a>, <a class="el" href="a05645.html#l00406">nglNewObjectBufferATI</a>, <a class="el" href="a05655.html#l00243">NL3D_DRV_ATI_FAKE_MEM_START</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>00442 {
00443         <a class="code" href="a04199.html#a6">nlassert</a>(!_Allocated);
00444 
00445         <span class="comment">// try to allocate AGP (suppose mean ATI dynamic) or VRAM (suppose mean ATI static) data.</span>
00446         <span class="keywordflow">switch</span>(vbType)
00447         {
00448         <span class="keywordflow">case</span> IDriver::VBHardAGP: 
00449                 <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr3">_VertexObjectId</a>= <a class="code" href="a04222.html#a172">nglNewObjectBufferATI</a>(size, NULL, GL_DYNAMIC_ATI);
00450                 <span class="keywordflow">break</span>;
00451         <span class="keywordflow">case</span> IDriver::VBHardVRAM:
00452                 <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr3">_VertexObjectId</a>= <a class="code" href="a04222.html#a172">nglNewObjectBufferATI</a>(size, NULL, GL_STATIC_ATI);
00453                 <span class="keywordflow">break</span>;
00454         };
00455 
00456 
00457         <span class="comment">// init the allocator, if success</span>
00458         <span class="keywordflow">if</span>( <a class="code" href="a04222.html#a173">nglIsObjectBufferATI</a>(_VertexObjectId) )
00459         {
00460                 <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr0">_Allocated</a>= <span class="keyword">true</span>;
00461                 <span class="comment">/* Init with an alignment of 8. Not sure if it is usefull.</span>
00462 <span class="comment">                        Init With a FAKE memory starting at NL3D_DRV_ATI_FAKE_MEM_START</span>
00463 <span class="comment">                */</span>
00464                 <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr1">_HeapMemory</a>.<a class="code" href="a02627.html#NLMISC_1_1CHeapMemorya5">initHeap</a>((<span class="keywordtype">void</span>*)NL3D_DRV_ATI_FAKE_MEM_START, size, 8);
00465 
00466                 <span class="comment">// set the size</span>
00467                 <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr2">_VertexArraySize</a>= <a class="code" href="a04223.html#a587">size</a>;
00468 
00469                 <span class="comment">// Ok!</span>
00470                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
00471         }
00472         <span class="keywordflow">else</span>
00473         {
00474                 <span class="comment">// failure.</span>
00475                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00476         }
00477 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeATId0" doxytag="NL3D::CVertexArrayRangeATI::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::CVertexArrayRangeATI::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#l00555">555</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <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#l00500">createVBHardGL()</a>.
<p>
<div class="fragment"><pre>00556 {
00557         <span class="keywordflow">return</span> <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr1">_HeapMemory</a>.<a class="code" href="a02627.html#NLMISC_1_1CHeapMemorya0">allocate</a>(size);
00558 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeATIz129_1" doxytag="NL3D::CVertexArrayRangeATI::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::CVertexArrayRangeATI::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#l00500">500</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05655.html#l00289">_Allocated</a>, <a class="el" href="a05654.html#l00555">allocateVB()</a>, <a class="el" href="a05654.html#l00605">NL3D::CVertexBufferHardGLATI::createRAMMirror()</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#l00627">NL3D::CVertexBufferHardGLATI::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>00501 {
00502         <span class="comment">// create a ATI VBHard</span>
00503         CVertexBufferHardGLATI  *newVbHard= <span class="keyword">new</span> CVertexBufferHardGLATI(_Driver);
00504 
00505         <span class="comment">// Init the format of the VB.</span>
00506         newVbHard-&gt;initFormat(vertexFormat, typeArray, numVertices, uvRouting);
00507 
00508         <span class="comment">// compute size to allocate.</span>
00509         <a class="code" href="a04558.html#a11">uint32</a>  <a class="code" href="a04223.html#a587">size</a>= newVbHard-&gt;getVertexSize() * newVbHard-&gt;getNumVertices();
00510 
00511         <span class="comment">// try to allocate</span>
00512         <span class="keywordtype">void</span>    *vertexPtr =NULL;
00513         <span class="keywordflow">if</span>( <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr0">_Allocated</a> )
00514         {
00515                  vertexPtr= <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATId0">allocateVB</a>(size);
00516         }
00517 
00518         <span class="comment">// If allocation fails.</span>
00519         <span class="keywordflow">if</span>( !vertexPtr )
00520         {
00521                 <span class="comment">// just destroy this object (no free()).</span>
00522                 <span class="keyword">delete</span> newVbHard;
00523                 <span class="keywordflow">return</span> NULL;
00524         }
00525         <span class="keywordflow">else</span>
00526         {
00527                 <span class="comment">// Then try to create a RAM mirror in the VB.</span>
00528                 <span class="keywordflow">if</span>( newVbHard-&gt;createRAMMirror(size) )
00529                 {
00530                         <span class="comment">// Ok, setup</span>
00531                         newVbHard-&gt;initGL(<span class="keyword">this</span>, vertexPtr);
00532                         <span class="keywordflow">return</span> newVbHard;
00533                 }
00534                 <span class="keywordflow">else</span>
00535                 {
00536                         <span class="comment">// Discard the VB.</span>
00537                         <span class="keyword">delete</span> newVbHard;
00538                         <span class="keywordflow">return</span> NULL;
00539                 }
00540         }
00541 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeATIa1" doxytag="NL3D::CVertexArrayRangeATI::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::CVertexArrayRangeATI::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; NB: no-op for ATI, but ensure correct _Driver-&gt;_CurrentVertexArrayRange value.
<p>
Definition at line <a class="el" href="a05654.html#l00549">549</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>.
<p>
Referenced by <a class="el" href="a05654.html#l00685">NL3D::CVertexBufferHardGLATI::disable()</a>.
<p>
<div class="fragment"><pre>00550 {
00551         <span class="comment">// No-op for ATI !!!</span>
00552         <a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangep0">_Driver</a>-&gt;_CurrentVertexArrayRange= NULL;
00553 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeATIa2" doxytag="NL3D::CVertexArrayRangeATI::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::CVertexArrayRangeATI::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. NB: no-op for ATI, but ensure correct _Driver-&gt;_CurrentVertexArrayRange value.
<p>
Definition at line <a class="el" href="a05654.html#l00543">543</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>.
<p>
Referenced by <a class="el" href="a05654.html#l00673">NL3D::CVertexBufferHardGLATI::enable()</a>.
<p>
<div class="fragment"><pre>00544 {
00545         <span class="comment">// No-op for ATI !!!</span>
00546         <a class="code" href="a03689.html#NL3D_1_1IVertexArrayRangep0">_Driver</a>-&gt;_CurrentVertexArrayRange= <span class="keyword">this</span>;
00547 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeATIz129_2" doxytag="NL3D::CVertexArrayRangeATI::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::CVertexArrayRangeATI::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#l00484">484</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05655.html#l00289">_Allocated</a>, <a class="el" href="a05655.html#l00288">_VertexObjectId</a>, <a class="el" href="a05645.html#l00411">nglDeleteObjectBufferATI</a>, and <a class="el" href="a05781.html#l00052">NLMISC::CHeapMemory::reset()</a>.
<p>
<div class="fragment"><pre>00485 {
00486         <span class="comment">// release the ptr.</span>
00487         <span class="keywordflow">if</span>(<a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr0">_Allocated</a>)
00488         {
00489                 <span class="comment">// reset the allocator.</span>
00490                 <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr1">_HeapMemory</a>.<a class="code" href="a02627.html#NLMISC_1_1CHeapMemorya6">reset</a>();
00491 
00492                 <span class="comment">// Free special memory.</span>
00493                 <a class="code" href="a04222.html#a177">nglDeleteObjectBufferATI</a>(_VertexObjectId);
00494 
00495                 <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr0">_Allocated</a>= <span class="keyword">false</span>;
00496                 <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr2">_VertexArraySize</a>= 0;
00497         }
00498 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeATIa3" doxytag="NL3D::CVertexArrayRangeATI::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::CVertexArrayRangeATI::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#l00560">560</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05781.html#l00173">NLMISC::CHeapMemory::free()</a>.
<p>
Referenced by <a class="el" href="a05654.html#l00585">NL3D::CVertexBufferHardGLATI::~CVertexBufferHardGLATI()</a>.
<p>
<div class="fragment"><pre>00561 {
00562         <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr1">_HeapMemory</a>.<a class="code" href="a02627.html#NLMISC_1_1CHeapMemorya2">free</a>(ptr);
00563 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeATIa4" doxytag="NL3D::CVertexArrayRangeATI::getATIVertexObjectId" ></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::CVertexArrayRangeATI::getATIVertexObjectId </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

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

<p>
get Handle of the ATI buffer. 
<p>

<p>
Definition at line <a class="el" href="a05655.html#l00284">284</a> of file <a class="el" href="a05655.html">driver_opengl_vertex_buffer_hard.h</a>.
<p>
References <a class="el" href="a05655.html#l00288">_VertexObjectId</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05655.html#l00341">NL3D::CVertexBufferHardGLATI::getATIVertexObjectId()</a>.
<p>
<div class="fragment"><pre>00284 {<span class="keywordflow">return</span> <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr3">_VertexObjectId</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeATIz129_3" doxytag="NL3D::CVertexArrayRangeATI::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::CVertexArrayRangeATI::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#l00479">479</a> of file <a class="el" href="a05654.html">driver_opengl_vertex_buffer_hard.cpp</a>.
<p>
References <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00480 {
00481         <span class="keywordflow">return</span> <a class="code" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr2">_VertexArraySize</a>;
00482 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NL3D_1_1CVertexArrayRangeATIr0" doxytag="NL3D::CVertexArrayRangeATI::_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 <a class="el" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr0">NL3D::CVertexArrayRangeATI::_Allocated</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#l00289">289</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#l00441">allocate()</a>, <a class="el" href="a05654.html#l00500">createVBHardGL()</a>, <a class="el" href="a05654.html#l00434">CVertexArrayRangeATI()</a>, and <a class="el" href="a05654.html#l00484">free()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1IVertexArrayRangep0" doxytag="NL3D::CVertexArrayRangeATI::_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_1CVertexArrayRangeATIr1" doxytag="NL3D::CVertexArrayRangeATI::_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="a03688.html#NL3D_1_1CVertexArrayRangeATIr1">NL3D::CVertexArrayRangeATI::_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#l00293">293</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_1CVertexArrayRangeATIr2" doxytag="NL3D::CVertexArrayRangeATI::_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="a03688.html#NL3D_1_1CVertexArrayRangeATIr2">NL3D::CVertexArrayRangeATI::_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#l00290">290</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_1CVertexArrayRangeATIr3" doxytag="NL3D::CVertexArrayRangeATI::_VertexObjectId" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a03688.html#NL3D_1_1CVertexArrayRangeATIr3">NL3D::CVertexArrayRangeATI::_VertexObjectId</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#l00288">288</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#l00441">allocate()</a>, <a class="el" href="a05654.html#l00434">CVertexArrayRangeATI()</a>, <a class="el" href="a05654.html#l00484">free()</a>, and <a class="el" href="a05655.html#l00284">getATIVertexObjectId()</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:03 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>