aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02542.html
blob: f76d6a1ec7b1172fc09c4c51f8aeaf012665f35a (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
<!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::CFontManager 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::CFontManager Class Reference</h1><code>#include &lt;<a class="el" href="a05723.html">font_manager.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Font manager The font manager manages <a class="el" href="a02839.html">CMaterial</a> pointers through a list of CSmartPtr. When the user asks for the texture font representing a character(font/size), it generates and stores this pointer in the list. If this character has already been generated, and lies in the list, it increments its reference count. If the memory used by generated textures exceeds the max memory, then the useless character/pointer is erased from the list. Max memory is set to 0 by default, so this value should be set to non-zero before generating textures to prevent immediate memory deletion. <dl compact><dt><b>Author:</b></dt><dd>Stephane Coutelas <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2000 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="a05723.html#l00062">62</a> of file <a class="el" href="a05723.html">font_manager.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02542.html#NL3D_1_1CFontManagera0">CFontManager</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02542.html#NL3D_1_1CFontManagera1">computeString</a> (const <a class="el" href="a03924.html">ucstring</a> &amp;<a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a02541.html">CFontGenerator</a> *fontGen, const <a class="el" href="a03337.html">NLMISC::CRGBA</a> &amp;color, <a class="el" href="a04558.html#a11">uint32</a> fontSize, <a class="el" href="a02434.html">IDriver</a> *driver, <a class="el" href="a02397.html">CComputedString</a> &amp;output, bool keep800x600Ratio=true)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02542.html#NL3D_1_1CFontManagera2">computeString</a> (const std::string &amp;<a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a02541.html">CFontGenerator</a> *fontGen, const <a class="el" href="a03337.html">NLMISC::CRGBA</a> &amp;color, <a class="el" href="a04558.html#a11">uint32</a> fontSize, <a class="el" href="a02434.html">IDriver</a> *driver, <a class="el" href="a02397.html">CComputedString</a> &amp;output, bool keep800x600Ratio=true)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02542.html#NL3D_1_1CFontManagera3">computeStringInfo</a> (const <a class="el" href="a03924.html">ucstring</a> &amp;<a class="el" href="a04223.html#a626">s</a>, <a class="el" href="a02541.html">CFontGenerator</a> *fontGen, const <a class="el" href="a03337.html">NLMISC::CRGBA</a> &amp;color, <a class="el" href="a04558.html#a11">uint32</a> fontSize, <a class="el" href="a02434.html">IDriver</a> *driver, <a class="el" href="a02397.html">CComputedString</a> &amp;output, bool keep800x600Ratio=true)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02542.html#NL3D_1_1CFontManagera4">dumpCache</a> (const char *<a class="el" href="a04560.html#a1">filename</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02542.html#NL3D_1_1CFontManagera5">getCacheInformation</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02839.html">CMaterial</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02542.html#NL3D_1_1CFontManagera6">getFontMaterial</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="a02542.html#NL3D_1_1CFontManagera7">getMaxMemory</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02542.html#NL3D_1_1CFontManagera8">setMaxMemory</a> (<a class="el" href="a04558.html#a11">uint32</a> mem)</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="a02839.html">CMaterial</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02542.html#NL3D_1_1CFontManagerr0">_MatFont</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="a02542.html#NL3D_1_1CFontManagerr1">_MaxMemory</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="a02542.html#NL3D_1_1CFontManagerr2">_MemSize</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="a02542.html#NL3D_1_1CFontManagerr3">_NbChar</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03506.html">CTextureFont</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02542.html#NL3D_1_1CFontManagerr4">_TexFont</a></td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NL3D_1_1CFontManagera0" doxytag="NL3D::CFontManager::CFontManager" ></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::CFontManager::CFontManager </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> [inline]</code></td>
        </tr>

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

<p>
Default constructor
<p>
Definition at line <a class="el" href="a05723.html#l00076">76</a> of file <a class="el" href="a05723.html">font_manager.h</a>.
<p>
References <a class="el" href="a05723.html#l00068">_MatFont</a>, <a class="el" href="a05723.html#l00065">_MaxMemory</a>, <a class="el" href="a05723.html#l00064">_MemSize</a>, <a class="el" href="a05723.html#l00066">_NbChar</a>, and <a class="el" href="a05723.html#l00069">_TexFont</a>.
<p>
<div class="fragment"><pre>00077         {
00078                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr2">_MemSize</a> = 0;
00079                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr1">_MaxMemory</a> = 1000000;
00080                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr3">_NbChar</a> = 0;
00081                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr0">_MatFont</a> = NULL;
00082                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr4">_TexFont</a> = NULL;
00083         }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CFontManagera1" doxytag="NL3D::CFontManager::computeString" ></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::CFontManager::computeString </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03924.html">ucstring</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02541.html">CFontGenerator</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>fontGen</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03337.html">NLMISC::CRGBA</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>color</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>fontSize</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>driver</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02397.html">CComputedString</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>output</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>keep800x600Ratio</em> = true</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

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

<p>
Same as computeString but works with a unicode string (ucstring)
<p>
Definition at line <a class="el" href="a05722.html#l00088">88</a> of file <a class="el" href="a05722.html">font_manager.cpp</a>.
<p>
References <a class="el" href="a06524.html#l00070">NL3D::CTextureFont::SLetterInfo::AdvX</a>, <a class="el" href="a06524.html#l00075">NL3D::CTextureFont::SLetterKey::Char</a>, <a class="el" href="a06524.html#l00066">NL3D::CTextureFont::SLetterInfo::CharHeight</a>, <a class="el" href="a06524.html#l00065">NL3D::CTextureFont::SLetterInfo::CharWidth</a>, <a class="el" href="a05596.html#l00088">NL3D::CComputedString::Color</a>, <a class="el" href="a06524.html#l00076">NL3D::CTextureFont::SLetterKey::FontGenerator</a>, <a class="el" href="a05722.html#l00049">getFontMaterial()</a>, <a class="el" href="a05486.html#l01388">NLMISC::CBitmap::getHeight()</a>, <a class="el" href="a06523.html#l00273">NL3D::CTextureFont::getLetterInfo()</a>, <a class="el" href="a05641.html#l00046">NL3D::CMaterial::getTexture()</a>, <a class="el" href="a05486.html#l01363">NLMISC::CBitmap::getWidth()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera38">NL3D::IDriver::getWindowSize()</a>, <a class="el" href="a05646.html#l01013">height</a>, <a class="el" href="a06524.html#l00069">NL3D::CTextureFont::SLetterInfo::Left</a>, <a class="el" href="a05596.html#l00087">NL3D::CComputedString::Material</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06710.html#l00409">NL3D::CVertexBuffer::setNumVertices()</a>, <a class="el" href="a06711.html#l00600">NL3D::CVertexBuffer::setTexCoord()</a>, <a class="el" href="a06711.html#l00524">NL3D::CVertexBuffer::setVertexCoord()</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a06524.html#l00077">NL3D::CTextureFont::SLetterKey::Size</a>, <a class="el" href="a05596.html#l00092">NL3D::CComputedString::StringHeight</a>, <a class="el" href="a05596.html#l00101">NL3D::CComputedString::StringLine</a>, <a class="el" href="a05596.html#l00090">NL3D::CComputedString::StringWidth</a>, <a class="el" href="a06524.html#l00068">NL3D::CTextureFont::SLetterInfo::Top</a>, <a class="el" href="a06524.html#l00064">NL3D::CTextureFont::SLetterInfo::U</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, <a class="el" href="a06524.html#l00064">NL3D::CTextureFont::SLetterInfo::V</a>, <a class="el" href="a05596.html#l00086">NL3D::CComputedString::Vertices</a>, <a class="el" href="a05646.html#l01013">width</a>, <a class="el" href="a05596.html#l00094">NL3D::CComputedString::XMax</a>, <a class="el" href="a05596.html#l00094">NL3D::CComputedString::XMin</a>, <a class="el" href="a05596.html#l00094">NL3D::CComputedString::ZMax</a>, and <a class="el" href="a05596.html#l00094">NL3D::CComputedString::ZMin</a>.
<p>
<div class="fragment"><pre>00095 {
00096         output.Color = color;
00097 
00098         <span class="comment">// resize fontSize if window not of 800x600.</span>
00099         <span class="keywordflow">if</span> (keep800x600Ratio)
00100         {
00101                 <a class="code" href="a04558.html#a11">uint32</a> <a class="code" href="a04223.html#a632">width</a>, <a class="code" href="a04223.html#a633">height</a>;
00102                 driver-&gt;getWindowSize (width, height);
00103                 <span class="keywordflow">if</span> ((<a class="code" href="a04223.html#a633">height</a> == 0) || (<a class="code" href="a04223.html#a632">width</a> == 0))
00104                         <span class="keywordflow">return</span>;
00105                 
00106                 <span class="comment">// keep the 800*600 ratio</span>
00107                 fontSize = (<a class="code" href="a04558.html#a11">uint32</a>)floor(fontSize*height/600.f);
00108                 fontSize = max(fontSize, (<a class="code" href="a04558.html#a11">uint32</a>)2);
00109         }
00110 
00111         <span class="comment">// Setting vertices format</span>
00112         output.Vertices.setNumVertices (4 * <a class="code" href="a04223.html#a626">s</a>.size());
00113 
00114         <span class="comment">// 1 character &lt;-&gt; 1 quad</span>
00115         <a class="code" href="a04558.html#a10">sint32</a> penx = 0, dx;
00116         <a class="code" href="a04558.html#a10">sint32</a> penz = 0, dz;
00117         <span class="keywordtype">float</span> x1, z1, x2, z2;
00118         <span class="keywordtype">float</span> u1, v1, u2, v2;
00119         CMaterial               *pMatFont = <a class="code" href="a02542.html#NL3D_1_1CFontManagera6">getFontMaterial</a>();
00120         CTextureFont    *pTexFont = (CTextureFont*)(pMatFont-&gt;getTexture (0));
00121         <span class="keywordtype">float</span> TexRatioW = 1.0f / pTexFont-&gt;getWidth();
00122         <span class="keywordtype">float</span> TexRatioH = 1.0f / pTexFont-&gt;getHeight();
00123         <span class="comment">/*float hlfPixTexW = 0.5f * TexRatioW;</span>
00124 <span class="comment">        float hlfPixTexH = 0.5f * TexRatioH;</span>
00125 <span class="comment">        float hlfPixScrW = 0.5f;</span>
00126 <span class="comment">        float hlfPixScrH = 0.5f;*/</span>
00127         <span class="comment">// Yoyo: Do not need Half Pixel/Texel displacement!!</span>
00128         <span class="keywordtype">float</span> hlfPixTexW = 0;
00129         <span class="keywordtype">float</span> hlfPixTexH = 0;
00130         <span class="keywordtype">float</span> hlfPixScrW = 0;
00131         <span class="keywordtype">float</span> hlfPixScrH = 0;
00132 
00133 
00134         CTextureFont::SLetterKey k;
00135 
00136         <span class="comment">// string bound.</span>
00137         output.XMin= FLT_MAX;
00138         output.XMax= -FLT_MAX;
00139         output.ZMin= FLT_MAX;
00140         output.ZMax= -FLT_MAX;
00141 
00142         <span class="comment">// string info.</span>
00143         <a class="code" href="a04558.html#a10">sint32</a> nMaxZ = -1000000, nMinZ = 1000000;
00144         output.StringHeight = 0;
00145 
00146         <span class="comment">// For all chats</span>
00147         <a class="code" href="a04558.html#a15">uint</a> j = 0;
00148         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i = 0; i &lt; <a class="code" href="a04223.html#a626">s</a>.size(); i++)
00149         {
00150                 <span class="comment">// Creating font</span>
00151                 k.Char = <a class="code" href="a04223.html#a626">s</a>[i];
00152                 k.FontGenerator = fontGen;
00153                 k.Size = fontSize;
00154                 CTextureFont::SLetterInfo *pLI = pTexFont-&gt;getLetterInfo (k);
00155                 <span class="keywordflow">if</span>(pLI != NULL)
00156                 {
00157                         <span class="keywordflow">if</span> ((pLI-&gt;CharWidth &gt; 0) &amp;&amp; (pLI-&gt;CharHeight &gt; 0))
00158                         {
00159                                 <span class="comment">// Creating vertices</span>
00160                                 dx = pLI-&gt;Left;
00161                                 dz = -((<a class="code" href="a04558.html#a10">sint32</a>)pLI-&gt;CharHeight-(<a class="code" href="a04558.html#a10">sint32</a>)(pLI-&gt;Top));
00162                                 u1 = pLI-&gt;U - hlfPixTexW;
00163                                 v1 = pLI-&gt;V - hlfPixTexH;
00164                                 u2 = pLI-&gt;U + ((<span class="keywordtype">float</span>)pLI-&gt;CharWidth) * TexRatioW + hlfPixTexW;
00165                                 v2 = pLI-&gt;V + ((<span class="keywordtype">float</span>)pLI-&gt;CharHeight) * TexRatioH + hlfPixTexH;
00166 
00167                                 x1 = (penx + dx) - hlfPixScrW;
00168                                 z1 = (penz + dz) - hlfPixScrH;
00169                                 x2 = (penx + dx + (<a class="code" href="a04558.html#a10">sint32</a>)pLI-&gt;CharWidth)  + hlfPixScrW;
00170                                 z2 = (penz + dz + (<a class="code" href="a04558.html#a10">sint32</a>)pLI-&gt;CharHeight) + hlfPixScrH;
00171 
00172                                 output.Vertices.setVertexCoord  (j, x1, 0, z1);
00173                                 output.Vertices.setTexCoord             (j, 0, u1, v2);
00174                                 ++j;
00175 
00176                                 output.Vertices.setVertexCoord  (j, x2, 0, z1);
00177                                 output.Vertices.setTexCoord             (j, 0, u2, v2);
00178                                 ++j;
00179 
00180                                 output.Vertices.setVertexCoord  (j, x2, 0, z2); 
00181                                 output.Vertices.setTexCoord             (j, 0, u2, v1);
00182                                 ++j;
00183 
00184                                 output.Vertices.setVertexCoord  (j, x1, 0, z2); 
00185                                 output.Vertices.setTexCoord             (j, 0, u1, v1);
00186                                 ++j;
00187                                 
00188                                 <span class="comment">// String Bound</span>
00189                                 output.XMin= <a class="code" href="a04061.html#a0">min</a>(output.XMin, x1);
00190                                 output.XMin= <a class="code" href="a04061.html#a0">min</a>(output.XMin, x2);
00191                                 output.XMax= max(output.XMax, x1);
00192                                 output.XMax= max(output.XMax, x2);
00193                                 output.ZMin= <a class="code" href="a04061.html#a0">min</a>(output.ZMin, z1);
00194                                 output.ZMin= <a class="code" href="a04061.html#a0">min</a>(output.ZMin, z2);
00195                                 output.ZMax= max(output.ZMax, z1);
00196                                 output.ZMax= max(output.ZMax, z2);
00197 
00198                                 <span class="comment">// String info</span>
00199                                 <a class="code" href="a04558.html#a10">sint32</a>  nZ1 = (<a class="code" href="a04558.html#a10">sint32</a>)pLI-&gt;Top-(<a class="code" href="a04558.html#a10">sint32</a>)pLI-&gt;CharHeight;
00200                                 <a class="code" href="a04558.html#a10">sint32</a>  nZ2 = pLI-&gt;Top;
00201                                 
00202                                 <span class="keywordflow">if</span> (nZ1 &lt; nMinZ) nMinZ = nZ1;
00203                                 <span class="keywordflow">if</span> (nZ2 &gt; nMaxZ) nMaxZ = nZ2;
00204                         }
00205                         penx += pLI-&gt;AdvX;
00206                 }
00207 
00208                 <span class="comment">// Building Material</span>
00209                 output.Material = pMatFont;
00210         }
00211         output.Vertices.setNumVertices (j);
00212 
00213         <span class="comment">// compile string info</span>
00214         output.StringWidth = (<span class="keywordtype">float</span>)penx;
00215         <span class="keywordflow">if</span>(nMaxZ&gt;nMinZ)
00216         {
00217                 output.StringHeight = (<span class="keywordtype">float</span>)(nMaxZ - nMinZ);
00218                 output.StringLine = -(<span class="keywordtype">float</span>)nMinZ;
00219         }
00220         <span class="keywordflow">else</span>
00221         {
00222                 output.StringHeight = 0;
00223                 output.StringLine = 0;
00224         }
00225 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CFontManagera2" doxytag="NL3D::CFontManager::computeString" ></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::CFontManager::computeString </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02541.html">CFontGenerator</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>fontGen</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03337.html">NLMISC::CRGBA</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>color</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>fontSize</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>driver</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02397.html">CComputedString</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>output</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>keep800x600Ratio</em> = true</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

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

<p>
Compute primitive blocks and materials of each character of the string. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>s</em>&nbsp;</td><td>string to compute </td></tr>
    <tr><td valign=top><em>fontGen</em>&nbsp;</td><td>font generator </td></tr>
    <tr><td valign=top><em>color</em>&nbsp;</td><td>primitive blocks color </td></tr>
    <tr><td valign=top><em>fontSize</em>&nbsp;</td><td>font size </td></tr>
    <tr><td valign=top><em>desc</em>&nbsp;</td><td>display descriptor (screen size, font ratio) </td></tr>
    <tr><td valign=top><em>output</em>&nbsp;</td><td>computed string </td></tr>
    <tr><td valign=top><em>keep800x600Ratio</em>&nbsp;</td><td>true if you want that <a class="el" href="a02542.html">CFontManager</a> look at Driver window size, and resize fontSize so it keeps same size...</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a05722.html#l00072">72</a> of file <a class="el" href="a05722.html">font_manager.cpp</a>.
<p>
References <a class="el" href="a05646.html#l00977">s</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
Referenced by <a class="el" href="a06502.html#l00263">NL3D::CTextContext::computeString()</a>, <a class="el" href="a06502.html#l00196">NL3D::CTextContext::printAt()</a>, <a class="el" href="a06502.html#l00218">NL3D::CTextContext::printfAt()</a>, and <a class="el" href="a06501.html#l00068">NL3D::CTextContext::textPush()</a>.
<p>
<div class="fragment"><pre>00079 {
00080         <span class="comment">// static to avoid reallocation</span>
00081         <span class="keyword">static</span> <a class="code" href="a03924.html">ucstring</a> ucs;
00082         ucs= <a class="code" href="a04223.html#a626">s</a>;
00083         <a class="code" href="a02542.html#NL3D_1_1CFontManagera2">computeString</a>(ucs, fontGen, color, fontSize, driver, output, keep800x600Ratio);
00084 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CFontManagera3" doxytag="NL3D::CFontManager::computeStringInfo" ></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::CFontManager::computeStringInfo </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03924.html">ucstring</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02541.html">CFontGenerator</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>fontGen</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03337.html">NLMISC::CRGBA</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>color</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>fontSize</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02434.html">IDriver</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>driver</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02397.html">CComputedString</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>output</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>keep800x600Ratio</em> = true</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

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

<p>
Same as computeString but do not make vertex buffers and primitives
<p>
Definition at line <a class="el" href="a05722.html#l00229">229</a> of file <a class="el" href="a05722.html">font_manager.cpp</a>.
<p>
References <a class="el" href="a06524.html#l00070">NL3D::CTextureFont::SLetterInfo::AdvX</a>, <a class="el" href="a06524.html#l00075">NL3D::CTextureFont::SLetterKey::Char</a>, <a class="el" href="a06524.html#l00066">NL3D::CTextureFont::SLetterInfo::CharHeight</a>, <a class="el" href="a06524.html#l00065">NL3D::CTextureFont::SLetterInfo::CharWidth</a>, <a class="el" href="a05596.html#l00088">NL3D::CComputedString::Color</a>, <a class="el" href="a06524.html#l00076">NL3D::CTextureFont::SLetterKey::FontGenerator</a>, <a class="el" href="a05722.html#l00049">getFontMaterial()</a>, <a class="el" href="a06523.html#l00273">NL3D::CTextureFont::getLetterInfo()</a>, <a class="el" href="a05641.html#l00046">NL3D::CMaterial::getTexture()</a>, <a class="el" href="a02434.html#NL3D_1_1IDrivera38">NL3D::IDriver::getWindowSize()</a>, <a class="el" href="a05646.html#l01013">height</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a06524.html#l00077">NL3D::CTextureFont::SLetterKey::Size</a>, <a class="el" href="a05596.html#l00092">NL3D::CComputedString::StringHeight</a>, <a class="el" href="a05596.html#l00101">NL3D::CComputedString::StringLine</a>, <a class="el" href="a05596.html#l00090">NL3D::CComputedString::StringWidth</a>, <a class="el" href="a06524.html#l00068">NL3D::CTextureFont::SLetterInfo::Top</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05646.html#l01013">width</a>.
<p>
Referenced by <a class="el" href="a06502.html#l00279">NL3D::CTextContext::computeStringInfo()</a>.
<p>
<div class="fragment"><pre>00236 {
00237         output.Color = color;
00238 
00239         <span class="comment">// resize fontSize if window not of 800x600.</span>
00240         <span class="keywordflow">if</span> (keep800x600Ratio)
00241         {
00242                 <a class="code" href="a04558.html#a11">uint32</a> <a class="code" href="a04223.html#a632">width</a>, <a class="code" href="a04223.html#a633">height</a>;
00243                 driver-&gt;getWindowSize (width, height);
00244                 <span class="keywordflow">if</span> ((<a class="code" href="a04223.html#a633">height</a> == 0) || (<a class="code" href="a04223.html#a632">width</a> == 0))
00245                         <span class="keywordflow">return</span>;
00246                 <span class="comment">// keep the 800*600 ratio</span>
00247                 fontSize = (<a class="code" href="a04558.html#a11">uint32</a>)floor(fontSize*height/600.f);
00248                 fontSize = max(fontSize, (<a class="code" href="a04558.html#a11">uint32</a>)2);
00249         }
00250         
00251         <a class="code" href="a04558.html#a10">sint32</a> penx = 0;
00252         <a class="code" href="a04558.html#a10">sint32</a> nMaxZ = -1000000, nMinZ = 1000000;
00253         CMaterial               *pMatFont = <a class="code" href="a02542.html#NL3D_1_1CFontManagera6">getFontMaterial</a>();
00254         CTextureFont    *pTexFont = (CTextureFont*)(pMatFont-&gt;getTexture (0));
00255 
00256         CTextureFont::SLetterKey k;
00257         CTextureFont::SLetterInfo *pLI;
00258 
00259         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i = 0; i &lt; <a class="code" href="a04223.html#a626">s</a>.size(); i++)
00260         {
00261                 <span class="comment">// Creating font</span>
00262                 k.Char = <a class="code" href="a04223.html#a626">s</a>[i];
00263                 k.FontGenerator = fontGen;
00264                 k.Size = fontSize;
00265                 pLI = pTexFont-&gt;getLetterInfo (k);
00266                 <span class="keywordflow">if</span>(pLI != NULL)
00267                 {
00268                         <span class="keywordflow">if</span> ((pLI-&gt;CharWidth &gt; 0) &amp;&amp; (pLI-&gt;CharHeight &gt; 0))
00269                         {
00270                                 <span class="comment">// String info</span>
00271                                 <a class="code" href="a04558.html#a10">sint32</a>  nZ1 = (<a class="code" href="a04558.html#a10">sint32</a>)pLI-&gt;Top-(<a class="code" href="a04558.html#a10">sint32</a>)pLI-&gt;CharHeight;
00272                                 <a class="code" href="a04558.html#a10">sint32</a>  nZ2 = pLI-&gt;Top;
00273                                 
00274                                 <span class="keywordflow">if</span> (nZ1 &lt; nMinZ) nMinZ = nZ1;
00275                                 <span class="keywordflow">if</span> (nZ2 &gt; nMaxZ) nMaxZ = nZ2;
00276                         }
00277                         penx += pLI-&gt;AdvX;
00278                 }
00279         }
00280 
00281         <span class="comment">// compile string info</span>
00282         output.StringWidth = (<span class="keywordtype">float</span>)penx;
00283         <span class="keywordflow">if</span>(nMaxZ&gt;nMinZ)
00284         {
00285                 output.StringHeight = (<span class="keywordtype">float</span>)(nMaxZ - nMinZ);
00286                 output.StringLine = -(<span class="keywordtype">float</span>)nMinZ;
00287         }
00288         <span class="keywordflow">else</span>
00289         {
00290                 output.StringHeight = 0;
00291                 output.StringLine = 0;
00292         }
00293 
00294 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CFontManagera4" doxytag="NL3D::CFontManager::dumpCache" ></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::CFontManager::dumpCache </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>filename</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

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

<p>

<p>
Definition at line <a class="el" href="a05723.html#l00154">154</a> of file <a class="el" href="a05723.html">font_manager.h</a>.
<p>
References <a class="el" href="a05723.html#l00069">_TexFont</a>, and <a class="el" href="a06523.html#l00133">NL3D::CTextureFont::dumpTextureFont()</a>.
<p>
Referenced by <a class="el" href="a06502.html#l00285">NL3D::CTextContext::dumpCache()</a>.
<p>
<div class="fragment"><pre>00155         {
00156                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr4">_TexFont</a>-&gt;dumpTextureFont (filename);
00157         }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CFontManagera5" doxytag="NL3D::CFontManager::getCacheInformation" ></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"> string NL3D::CFontManager::getCacheInformation </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</td>
        </tr>

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

<p>
return a string given information about the cache
<p>
Definition at line <a class="el" href="a05722.html#l00298">298</a> of file <a class="el" href="a05722.html">font_manager.cpp</a>.
<p>
References <a class="el" href="a05723.html#l00065">_MaxMemory</a>, <a class="el" href="a05723.html#l00064">_MemSize</a>, <a class="el" href="a05723.html#l00066">_NbChar</a>, and <a class="el" href="a06229.html#l02652">NLMISC::toString()</a>.
<p>
Referenced by <a class="el" href="a05659.html#l00110">NL3D::CDriverUser::getFontManagerCacheInformation()</a>.
<p>
<div class="fragment"><pre>00299 {
00300 <span class="comment">//      stringstream ss;</span>
00301 <span class="comment">//      ss &lt;&lt; "MaxMemory: " &lt;&lt; (uint) _MaxMemory &lt;&lt; " MemSize: " &lt;&lt; (uint) _MemSize &lt;&lt; " NbChar: " &lt;&lt; (uint) _NbChar;</span>
00302 <span class="comment">//      return ss.str();</span>
00303         string str;
00304         str = <span class="stringliteral">"MaxMemory: "</span> + <a class="code" href="a05378.html#a244">NLMISC::toString</a>(_MaxMemory) + <span class="stringliteral">" MemSize: "</span> + <a class="code" href="a05378.html#a244">NLMISC::toString</a>(_MemSize) + <span class="stringliteral">" NbChar: "</span> + <a class="code" href="a05378.html#a244">NLMISC::toString</a>(_NbChar);
00305         <span class="keywordflow">return</span> str;
00306 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CFontManagera6" doxytag="NL3D::CFontManager::getFontMaterial" ></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="a02839.html">CMaterial</a> * NL3D::CFontManager::getFontMaterial </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>
manages fonts in memory using CSmartPtr <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>character</em>&nbsp;</td><td>descriptor </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>CSmartPtr to a font texture</dd></dl>

<p>
Definition at line <a class="el" href="a05722.html#l00049">49</a> of file <a class="el" href="a05722.html">font_manager.cpp</a>.
<p>
References <a class="el" href="a05723.html#l00068">_MatFont</a>, <a class="el" href="a05723.html#l00069">_TexFont</a>, <a class="el" href="a05968.html#l00059">NL3D::CMaterial::initUnlit()</a>, <a class="el" href="a05641.html#l00064">NL3D::CMaterial::setBlend()</a>, <a class="el" href="a05641.html#l00058">NL3D::CMaterial::setDstBlend()</a>, <a class="el" href="a05641.html#l00052">NL3D::CMaterial::setSrcBlend()</a>, <a class="el" href="a05968.html#l00322">NL3D::CMaterial::setTexture()</a>, <a class="el" href="a05641.html#l00221">NL3D::CMaterial::texEnvArg0RGB()</a>, and <a class="el" href="a05641.html#l00214">NL3D::CMaterial::texEnvOpRGB()</a>.
<p>
Referenced by <a class="el" href="a05722.html#l00088">computeString()</a>, <a class="el" href="a05722.html#l00229">computeStringInfo()</a>, <a class="el" href="a06503.html#l00398">NL3D::CTextContextUser::flushRenderBuffer()</a>, and <a class="el" href="a06503.html#l00411">NL3D::CTextContextUser::flushRenderBufferUnProjected()</a>.
<p>
<div class="fragment"><pre>00050 {
00051         <span class="keywordflow">if</span> (<a class="code" href="a02542.html#NL3D_1_1CFontManagerr4">_TexFont</a> == NULL)
00052         {
00053                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr4">_TexFont</a> = <span class="keyword">new</span> CTextureFont;
00054         }
00055 
00056         <span class="keywordflow">if</span> (<a class="code" href="a02542.html#NL3D_1_1CFontManagerr0">_MatFont</a> == NULL)
00057         {
00058                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr0">_MatFont</a>= <span class="keyword">new</span> CMaterial;
00059                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr0">_MatFont</a>-&gt;initUnlit();
00060                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr0">_MatFont</a>-&gt;setSrcBlend(CMaterial::srcalpha);
00061                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr0">_MatFont</a>-&gt;setDstBlend(CMaterial::invsrcalpha);
00062                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr0">_MatFont</a>-&gt;setBlend(<span class="keyword">true</span>);
00063                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr0">_MatFont</a>-&gt;setTexture(0, _TexFont);
00064                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr0">_MatFont</a>-&gt;texEnvOpRGB(0, CMaterial::Replace);
00065                 <a class="code" href="a02542.html#NL3D_1_1CFontManagerr0">_MatFont</a>-&gt;texEnvArg0RGB(0, CMaterial::Diffuse, CMaterial::SrcColor);
00066         }
00067         <span class="keywordflow">return</span> <a class="code" href="a02542.html#NL3D_1_1CFontManagerr0">_MatFont</a>;
00068 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CFontManagera7" doxytag="NL3D::CFontManager::getMaxMemory" ></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> NL3D::CFontManager::getMaxMemory </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>
gives maximum memory allowed <dl compact><dt><b>Returns:</b></dt><dd>maximum memory</dd></dl>

<p>
Definition at line <a class="el" href="a05723.html#l00097">97</a> of file <a class="el" href="a05723.html">font_manager.h</a>.
<p>
References <a class="el" href="a05723.html#l00065">_MaxMemory</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
<div class="fragment"><pre>00097 { <span class="keywordflow">return</span> <a class="code" href="a02542.html#NL3D_1_1CFontManagerr1">_MaxMemory</a>; }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CFontManagera8" doxytag="NL3D::CFontManager::setMaxMemory" ></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::CFontManager::setMaxMemory </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>mem</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

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

<p>
define maximum memory allowed <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>maximum</em>&nbsp;</td><td>memory</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a05723.html#l00090">90</a> of file <a class="el" href="a05723.html">font_manager.h</a>.
<p>
References <a class="el" href="a05723.html#l00065">_MaxMemory</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
Referenced by <a class="el" href="a05659.html#l00103">NL3D::CDriverUser::setFontManagerMaxMemory()</a>.
<p>
<div class="fragment"><pre>00090 { <a class="code" href="a02542.html#NL3D_1_1CFontManagerr1">_MaxMemory</a> = mem; }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NL3D_1_1CFontManagerr0" doxytag="NL3D::CFontManager::_MatFont" ></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="a02839.html">CMaterial</a>* <a class="el" href="a02542.html#NL3D_1_1CFontManagerr0">NL3D::CFontManager::_MatFont</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="a05723.html#l00068">68</a> of file <a class="el" href="a05723.html">font_manager.h</a>.
<p>
Referenced by <a class="el" href="a05723.html#l00076">CFontManager()</a>, and <a class="el" href="a05722.html#l00049">getFontMaterial()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CFontManagerr1" doxytag="NL3D::CFontManager::_MaxMemory" ></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="a02542.html#NL3D_1_1CFontManagerr1">NL3D::CFontManager::_MaxMemory</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="a05723.html#l00065">65</a> of file <a class="el" href="a05723.html">font_manager.h</a>.
<p>
Referenced by <a class="el" href="a05723.html#l00076">CFontManager()</a>, <a class="el" href="a05722.html#l00298">getCacheInformation()</a>, <a class="el" href="a05723.html#l00097">getMaxMemory()</a>, and <a class="el" href="a05723.html#l00090">setMaxMemory()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CFontManagerr2" doxytag="NL3D::CFontManager::_MemSize" ></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="a02542.html#NL3D_1_1CFontManagerr2">NL3D::CFontManager::_MemSize</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="a05723.html#l00064">64</a> of file <a class="el" href="a05723.html">font_manager.h</a>.
<p>
Referenced by <a class="el" href="a05723.html#l00076">CFontManager()</a>, and <a class="el" href="a05722.html#l00298">getCacheInformation()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CFontManagerr3" doxytag="NL3D::CFontManager::_NbChar" ></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="a02542.html#NL3D_1_1CFontManagerr3">NL3D::CFontManager::_NbChar</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="a05723.html#l00066">66</a> of file <a class="el" href="a05723.html">font_manager.h</a>.
<p>
Referenced by <a class="el" href="a05723.html#l00076">CFontManager()</a>, and <a class="el" href="a05722.html#l00298">getCacheInformation()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CFontManagerr4" doxytag="NL3D::CFontManager::_TexFont" ></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="a03506.html">CTextureFont</a>* <a class="el" href="a02542.html#NL3D_1_1CFontManagerr4">NL3D::CFontManager::_TexFont</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="a05723.html#l00069">69</a> of file <a class="el" href="a05723.html">font_manager.h</a>.
<p>
Referenced by <a class="el" href="a05723.html#l00076">CFontManager()</a>, <a class="el" href="a05723.html#l00154">dumpCache()</a>, and <a class="el" href="a05722.html#l00049">getFontMaterial()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a05723.html">font_manager.h</a><li><a class="el" href="a05722.html">font_manager.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 06:46:58 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>