0023022: This is desirable to access OpenGl extensions and core API (1.2+) in one...
[occt.git] / src / OpenGl / OpenGl_Display_2.cxx
1 // File:      OpenGl_Display_2.cxx
2 // Created:   25 October 2011
3 // Author:    Sergey ZERCHANINOV
4 // Copyright: OPEN CASCADE 2011
5
6 #include <OpenGl_GlCore11.hxx>
7
8 #include <OpenGl_Display.hxx>
9
10 #ifdef HAVE_GL2PS
11   #include <gl2ps.h>
12 #endif
13
14 #define  DOT_LS            0xCCCC
15 #define  DASH_DOT_LS       0xFF18
16 #define  DASH_LS           0xFFC0
17 #define  DASH_DDOT_LS      0xFF24
18
19 static const unsigned int myInteriors[TEL_HS_USER_DEF_START][32] =
20 {
21   //TEL_HS_SOLID
22   {
23     0xFFFFFFFF,
24     0xFFFFFFFF,
25     0xFFFFFFFF,
26     0xFFFFFFFF,
27     0xFFFFFFFF,
28     0xFFFFFFFF,
29     0xFFFFFFFF,
30     0xFFFFFFFF,
31     0xFFFFFFFF,
32     0xFFFFFFFF,
33     0xFFFFFFFF,
34     0xFFFFFFFF,
35     0xFFFFFFFF,
36     0xFFFFFFFF,
37     0xFFFFFFFF,
38     0xFFFFFFFF,
39     0xFFFFFFFF,
40     0xFFFFFFFF,
41     0xFFFFFFFF,
42     0xFFFFFFFF,
43     0xFFFFFFFF,
44     0xFFFFFFFF,
45     0xFFFFFFFF,
46     0xFFFFFFFF,
47     0xFFFFFFFF,
48     0xFFFFFFFF,
49     0xFFFFFFFF,
50     0xFFFFFFFF,
51     0xFFFFFFFF,
52     0xFFFFFFFF,
53     0xFFFFFFFF,
54     0xFFFFFFFF
55   },
56   //TEL_HS_CROSS
57   {
58     0xFFFFFFFF,
59     0xBBBBBBBB,
60     0xEEEEEEEE,
61     0xBBBBBBBB,
62     0xEEEEEEEE,
63     0xBBBBBBBB,
64     0xEEEEEEEE,
65     0xBBBBBBBB,
66     0xEEEEEEEE,
67     0xBBBBBBBB,
68     0xEEEEEEEE,
69     0xBBBBBBBB,
70     0xEEEEEEEE,
71     0xBBBBBBBB,
72     0xEEEEEEEE,
73     0xBBBBBBBB,
74     0xEEEEEEEE,
75     0xBBBBBBBB,
76     0xEEEEEEEE,
77     0xBBBBBBBB,
78     0xEEEEEEEE,
79     0xBBBBBBBB,
80     0xEEEEEEEE,
81     0xBBBBBBBB,
82     0xEEEEEEEE,
83     0xBBBBBBBB,
84     0xEEEEEEEE,
85     0xBBBBBBBB,
86     0xEEEEEEEE,
87     0xBBBBBBBB,
88     0xEEEEEEEE,
89     0xBBBBBBBB
90   },
91   //TEL_HS_CROSS_SPARSE
92   {
93     0x81818181,
94     0x24242424,
95     0x18181818,
96     0x42424242,
97     0x81818181,
98     0x24242424,
99     0x18181818,
100     0x42424242,
101     0x81818181,
102     0x24242424,
103     0x18181818,
104     0x42424242,
105     0x81818181,
106     0x24242424,
107     0x18181818,
108     0x42424242,
109     0x81818181,
110     0x24242424,
111     0x18181818,
112     0x42424242,
113     0x81818181,
114     0x24242424,
115     0x18181818,
116     0x42424242,
117     0x81818181,
118     0x24242424,
119     0x18181818,
120     0x42424242,
121     0x81818181,
122     0x24242424,
123     0x18181818,
124     0x42424242
125   },
126   //TEL_HS_GRID
127   {
128     0xFFFFFFFF,
129     0x88888888,
130     0xFFFFFFFF,
131     0x88888888,
132     0xFFFFFFFF,
133     0x88888888,
134     0xFFFFFFFF,
135     0x88888888,
136     0xFFFFFFFF,
137     0x88888888,
138     0xFFFFFFFF,
139     0x88888888,
140     0xFFFFFFFF,
141     0x88888888,
142     0xFFFFFFFF,
143     0x88888888,
144     0xFFFFFFFF,
145     0x88888888,
146     0xFFFFFFFF,
147     0x88888888,
148     0xFFFFFFFF,
149     0x88888888,
150     0xFFFFFFFF,
151     0x88888888,
152     0xFFFFFFFF,
153     0x88888888,
154     0xFFFFFFFF,
155     0x88888888,
156     0xFFFFFFFF,
157     0x88888888,
158     0xFFFFFFFF,
159     0x88888888
160   },
161   //TEL_HS_GRID_SPARSE
162   {
163     0xFFFFFFFF,
164     0x80808080,
165     0x80808080,
166     0x80808080,
167     0xFFFFFFFF,
168     0x80808080,
169     0x80808080,
170     0x80808080,
171     0xFFFFFFFF,
172     0x80808080,
173     0x80808080,
174     0x80808080,
175     0xFFFFFFFF,
176     0x80808080,
177     0x80808080,
178     0x80808080,
179     0xFFFFFFFF,
180     0x80808080,
181     0x80808080,
182     0x80808080,
183     0xFFFFFFFF,
184     0x80808080,
185     0x80808080,
186     0x80808080,
187     0xFFFFFFFF,
188     0x80808080,
189     0x80808080,
190     0x80808080,
191     0xFFFFFFFF,
192     0x80808080,
193     0x80808080,
194     0x80808080
195   },
196   //TEL_HS_DIAG_45
197   {
198     0x88888888,
199     0x22222222,
200     0x88888888,
201     0x22222222,
202     0x88888888,
203     0x22222222,
204     0x88888888,
205     0x22222222,
206     0x88888888,
207     0x22222222,
208     0x88888888,
209     0x22222222,
210     0x88888888,
211     0x22222222,
212     0x88888888,
213     0x22222222,
214     0x88888888,
215     0x22222222,
216     0x88888888,
217     0x22222222,
218     0x88888888,
219     0x22222222,
220     0x88888888,
221     0x22222222,
222     0x88888888,
223     0x22222222,
224     0x88888888,
225     0x22222222,
226     0x88888888,
227     0x22222222,
228     0x88888888,
229     0x22222222
230   },
231   //TEL_HS_DIAG_135
232   {
233     0x11111111,
234     0x44444444,
235     0x11111111,
236     0x44444444,
237     0x11111111,
238     0x44444444,
239     0x11111111,
240     0x44444444,
241     0x11111111,
242     0x44444444,
243     0x11111111,
244     0x44444444,
245     0x11111111,
246     0x44444444,
247     0x11111111,
248     0x44444444,
249     0x11111111,
250     0x44444444,
251     0x11111111,
252     0x44444444,
253     0x11111111,
254     0x44444444,
255     0x11111111,
256     0x44444444,
257     0x11111111,
258     0x44444444,
259     0x11111111,
260     0x44444444,
261     0x11111111,
262     0x44444444,
263     0x11111111,
264     0x44444444
265   },
266   //TEL_HS_HORIZONTAL
267   {
268     0xFFFFFFFF,
269     0x00000000,
270     0xFFFFFFFF,
271     0x00000000,
272     0xFFFFFFFF,
273     0x00000000,
274     0xFFFFFFFF,
275     0x00000000,
276     0xFFFFFFFF,
277     0x00000000,
278     0xFFFFFFFF,
279     0x00000000,
280     0xFFFFFFFF,
281     0x00000000,
282     0xFFFFFFFF,
283     0x00000000,
284     0xFFFFFFFF,
285     0x00000000,
286     0xFFFFFFFF,
287     0x00000000,
288     0xFFFFFFFF,
289     0x00000000,
290     0xFFFFFFFF,
291     0x00000000,
292     0xFFFFFFFF,
293     0x00000000,
294     0xFFFFFFFF,
295     0x00000000,
296     0xFFFFFFFF,
297     0x00000000,
298     0xFFFFFFFF,
299     0x00000000
300   },
301   //TEL_HS_VERTICAL
302   {
303     0x11111111,
304     0x11111111,
305     0x11111111,
306     0x11111111,
307     0x11111111,
308     0x11111111,
309     0x11111111,
310     0x11111111,
311     0x11111111,
312     0x11111111,
313     0x11111111,
314     0x11111111,
315     0x11111111,
316     0x11111111,
317     0x11111111,
318     0x11111111,
319     0x11111111,
320     0x11111111,
321     0x11111111,
322     0x11111111,
323     0x11111111,
324     0x11111111,
325     0x11111111,
326     0x11111111,
327     0x11111111,
328     0x11111111,
329     0x11111111,
330     0x11111111,
331     0x11111111,
332     0x11111111,
333     0x11111111,
334     0x11111111
335   },
336   //TEL_HS_DIAG_45_SPARSE
337   {
338     0x80808080,
339     0x20202020,
340     0x08080808,
341     0x02020202,
342     0x80808080,
343     0x20202020,
344     0x08080808,
345     0x02020202,
346     0x80808080,
347     0x20202020,
348     0x08080808,
349     0x02020202,
350     0x80808080,
351     0x20202020,
352     0x08080808,
353     0x02020202,
354     0x80808080,
355     0x20202020,
356     0x08080808,
357     0x02020202,
358     0x80808080,
359     0x20202020,
360     0x08080808,
361     0x02020202,
362     0x80808080,
363     0x20202020,
364     0x08080808,
365     0x02020202,
366     0x80808080,
367     0x20202020,
368     0x08080808,
369     0x02020202
370   },
371   //TEL_HS_DIAG_135_SPARSE
372   {
373     0x01010101,
374     0x04040404,
375     0x10101010,
376     0x40404040,
377     0x01010101,
378     0x04040404,
379     0x10101010,
380     0x40404040,
381     0x01010101,
382     0x04040404,
383     0x10101010,
384     0x40404040,
385     0x01010101,
386     0x04040404,
387     0x10101010,
388     0x40404040,
389     0x01010101,
390     0x04040404,
391     0x10101010,
392     0x40404040,
393     0x01010101,
394     0x04040404,
395     0x10101010,
396     0x40404040,
397     0x01010101,
398     0x04040404,
399     0x10101010,
400     0x40404040,
401     0x01010101,
402     0x04040404,
403     0x10101010,
404     0x40404040
405   },
406   //TEL_HS_HORIZONTAL_SPARSE
407   {
408     0xFFFFFFFF,
409     0x00000000,
410     0x00000000,
411     0x00000000,
412     0xFFFFFFFF,
413     0x00000000,
414     0x00000000,
415     0x00000000,
416     0xFFFFFFFF,
417     0x00000000,
418     0x00000000,
419     0x00000000,
420     0xFFFFFFFF,
421     0x00000000,
422     0x00000000,
423     0x00000000,
424     0xFFFFFFFF,
425     0x00000000,
426     0x00000000,
427     0x00000000,
428     0xFFFFFFFF,
429     0x00000000,
430     0x00000000,
431     0x00000000,
432     0xFFFFFFFF,
433     0x00000000,
434     0x00000000,
435     0x00000000,
436     0xFFFFFFFF,
437     0x00000000,
438     0x00000000,
439     0x00000000
440   },
441   //TEL_HS_VERTICAL_SPARSE
442   {
443     0x10101010,
444     0x10101010,
445     0x10101010,
446     0x10101010,
447     0x10101010,
448     0x10101010,
449     0x10101010,
450     0x10101010,
451     0x10101010,
452     0x10101010,
453     0x10101010,
454     0x10101010,
455     0x10101010,
456     0x10101010,
457     0x10101010,
458     0x10101010,
459     0x10101010,
460     0x10101010,
461     0x10101010,
462     0x10101010,
463     0x10101010,
464     0x10101010,
465     0x10101010,
466     0x10101010,
467     0x10101010,
468     0x10101010,
469     0x10101010,
470     0x10101010,
471     0x10101010,
472     0x10101010,
473     0x10101010,
474     0x10101010
475   }
476 };
477
478 /* Following Section relates to POLYMARKER */
479
480 #define TEL_NO_OF_SIZES   13
481 #define TEL_NB_OF_LISTS   5
482
483 struct PM_FONT_INFO
484 {
485   const char *str;
486   Tfloat width, height;
487   Tint offset;
488 };
489 typedef PM_FONT_INFO* pm_font_info;
490
491 #define PM_PLUS_10_NUM  9*2
492 #define PM_PLUS_15_NUM  11*2
493 #define PM_PLUS_20_NUM  13*2
494 #define PM_PLUS_25_NUM  15*2
495 #define PM_PLUS_30_NUM  17*3
496 #define PM_PLUS_35_NUM  19*3
497 #define PM_PLUS_40_NUM  21*3
498 #define PM_PLUS_45_NUM  23*3
499 #define PM_PLUS_50_NUM  25*4
500 #define PM_PLUS_55_NUM  27*4
501 #define PM_PLUS_60_NUM  29*4
502 #define PM_PLUS_65_NUM  31*4
503 #define PM_PLUS_70_NUM  32*4
504
505 #define PM_STAR_10_NUM  9
506 #define PM_STAR_15_NUM  11*2
507 #define PM_STAR_20_NUM  13*2
508 #define PM_STAR_25_NUM  15*2
509 #define PM_STAR_30_NUM  17*2
510 #define PM_STAR_35_NUM  19*2
511 #define PM_STAR_40_NUM  21*3
512 #define PM_STAR_45_NUM  23*3
513 #define PM_STAR_50_NUM  25*3
514 #define PM_STAR_55_NUM  27*3
515 #define PM_STAR_60_NUM  29*4
516 #define PM_STAR_65_NUM  32*4
517 #define PM_STAR_70_NUM  32*4
518
519 #define PM_CIRC_10_NUM  7
520 #define PM_CIRC_15_NUM  9*2
521 #define PM_CIRC_20_NUM  9*2
522 #define PM_CIRC_25_NUM  11*2
523 #define PM_CIRC_30_NUM  13*2
524 #define PM_CIRC_35_NUM  15*2
525 #define PM_CIRC_40_NUM  17*3
526 #define PM_CIRC_45_NUM  19*3
527 #define PM_CIRC_50_NUM  21*3
528 #define PM_CIRC_55_NUM  23*3
529 #define PM_CIRC_60_NUM  25*4
530 #define PM_CIRC_65_NUM  27*4
531 #define PM_CIRC_70_NUM  29*4
532
533 #define PM_CROSS_10_NUM 7
534 #define PM_CROSS_15_NUM 9*2
535 #define PM_CROSS_20_NUM 11*2
536 #define PM_CROSS_25_NUM 13*2
537 #define PM_CROSS_30_NUM 15*2
538 #define PM_CROSS_35_NUM 17*3
539 #define PM_CROSS_40_NUM 19*3
540 #define PM_CROSS_45_NUM 21*3
541 #define PM_CROSS_50_NUM 23*3
542 #define PM_CROSS_55_NUM 25*4
543 #define PM_CROSS_60_NUM 27*4
544 #define PM_CROSS_65_NUM 32*4
545 #define PM_CROSS_70_NUM 32*4
546
547 #define PM_PLUS_10_OFT  0
548 #define PM_PLUS_15_OFT  PM_PLUS_10_OFT + PM_PLUS_10_NUM
549 #define PM_PLUS_20_OFT  PM_PLUS_15_OFT + PM_PLUS_15_NUM
550 #define PM_PLUS_25_OFT  PM_PLUS_20_OFT + PM_PLUS_20_NUM
551 #define PM_PLUS_30_OFT  PM_PLUS_25_OFT + PM_PLUS_25_NUM
552 #define PM_PLUS_35_OFT  PM_PLUS_30_OFT + PM_PLUS_30_NUM
553 #define PM_PLUS_40_OFT  PM_PLUS_35_OFT + PM_PLUS_35_NUM
554 #define PM_PLUS_45_OFT  PM_PLUS_40_OFT + PM_PLUS_40_NUM
555 #define PM_PLUS_50_OFT  PM_PLUS_45_OFT + PM_PLUS_45_NUM
556 #define PM_PLUS_55_OFT  PM_PLUS_50_OFT + PM_PLUS_50_NUM
557 #define PM_PLUS_60_OFT  PM_PLUS_55_OFT + PM_PLUS_55_NUM
558 #define PM_PLUS_65_OFT  PM_PLUS_60_OFT + PM_PLUS_60_NUM
559 #define PM_PLUS_70_OFT  PM_PLUS_65_OFT + PM_PLUS_65_NUM
560
561 #define PM_STAR_10_OFT  PM_PLUS_70_OFT + PM_PLUS_70_NUM
562 #define PM_STAR_15_OFT  PM_STAR_10_OFT + PM_STAR_10_NUM
563 #define PM_STAR_20_OFT  PM_STAR_15_OFT + PM_STAR_15_NUM
564 #define PM_STAR_25_OFT  PM_STAR_20_OFT + PM_STAR_20_NUM
565 #define PM_STAR_30_OFT  PM_STAR_25_OFT + PM_STAR_25_NUM
566 #define PM_STAR_35_OFT  PM_STAR_30_OFT + PM_STAR_30_NUM
567 #define PM_STAR_40_OFT  PM_STAR_35_OFT + PM_STAR_35_NUM
568 #define PM_STAR_45_OFT  PM_STAR_40_OFT + PM_STAR_40_NUM
569 #define PM_STAR_50_OFT  PM_STAR_45_OFT + PM_STAR_45_NUM
570 #define PM_STAR_55_OFT  PM_STAR_50_OFT + PM_STAR_50_NUM
571 #define PM_STAR_60_OFT  PM_STAR_55_OFT + PM_STAR_55_NUM
572 #define PM_STAR_65_OFT  PM_STAR_60_OFT + PM_STAR_60_NUM
573 #define PM_STAR_70_OFT  PM_STAR_65_OFT + PM_STAR_65_NUM
574
575 #define PM_CIRC_10_OFT  PM_STAR_70_OFT + PM_STAR_70_NUM
576 #define PM_CIRC_15_OFT  PM_CIRC_10_OFT + PM_CIRC_10_NUM
577 #define PM_CIRC_20_OFT  PM_CIRC_15_OFT + PM_CIRC_15_NUM
578 #define PM_CIRC_25_OFT  PM_CIRC_20_OFT + PM_CIRC_20_NUM
579 #define PM_CIRC_30_OFT  PM_CIRC_25_OFT + PM_CIRC_25_NUM
580 #define PM_CIRC_35_OFT  PM_CIRC_30_OFT + PM_CIRC_30_NUM
581 #define PM_CIRC_40_OFT  PM_CIRC_35_OFT + PM_CIRC_35_NUM
582 #define PM_CIRC_45_OFT  PM_CIRC_40_OFT + PM_CIRC_40_NUM
583 #define PM_CIRC_50_OFT  PM_CIRC_45_OFT + PM_CIRC_45_NUM
584 #define PM_CIRC_55_OFT  PM_CIRC_50_OFT + PM_CIRC_50_NUM
585 #define PM_CIRC_60_OFT  PM_CIRC_55_OFT + PM_CIRC_55_NUM
586 #define PM_CIRC_65_OFT  PM_CIRC_60_OFT + PM_CIRC_60_NUM
587 #define PM_CIRC_70_OFT  PM_CIRC_65_OFT + PM_CIRC_65_NUM
588
589 #define PM_CROSS_10_OFT  PM_CIRC_70_OFT + PM_CIRC_70_NUM
590 #define PM_CROSS_15_OFT  PM_CROSS_10_OFT + PM_CROSS_10_NUM
591 #define PM_CROSS_20_OFT  PM_CROSS_15_OFT + PM_CROSS_15_NUM
592 #define PM_CROSS_25_OFT  PM_CROSS_20_OFT + PM_CROSS_20_NUM
593 #define PM_CROSS_30_OFT  PM_CROSS_25_OFT + PM_CROSS_25_NUM
594 #define PM_CROSS_35_OFT  PM_CROSS_30_OFT + PM_CROSS_30_NUM
595 #define PM_CROSS_40_OFT  PM_CROSS_35_OFT + PM_CROSS_35_NUM
596 #define PM_CROSS_45_OFT  PM_CROSS_40_OFT + PM_CROSS_40_NUM
597 #define PM_CROSS_50_OFT  PM_CROSS_45_OFT + PM_CROSS_45_NUM
598 #define PM_CROSS_55_OFT  PM_CROSS_50_OFT + PM_CROSS_50_NUM
599 #define PM_CROSS_60_OFT  PM_CROSS_55_OFT + PM_CROSS_55_NUM
600 #define PM_CROSS_65_OFT  PM_CROSS_60_OFT + PM_CROSS_60_NUM
601 #define PM_CROSS_70_OFT  PM_CROSS_65_OFT + PM_CROSS_65_NUM
602
603 static const PM_FONT_INFO arrPMFontInfo[][TEL_NO_OF_SIZES] =
604 {
605  /* TOM_POINT - not used */
606  {{"\0"},
607   {"\0"},
608   {"\0"},
609   {"\0"},
610   {"\0"},
611   {"\0"},
612   {"\0"},
613   {"\0"},
614   {"\0"},
615   {"\0"},
616   {"\0"},
617   {"\0"},
618   {"\0"}},
619
620  /* TOM_PLUS */
621  {{"\001",  9.f,  9.f, PM_PLUS_10_OFT},
622   {"\002", 11.f, 11.f, PM_PLUS_15_OFT},
623   {"\003", 13.f, 13.f, PM_PLUS_20_OFT},
624   {"\004", 15.f, 15.f, PM_PLUS_25_OFT},
625   {"\005", 17.f, 17.f, PM_PLUS_30_OFT},
626   {"\006", 19.f, 19.f, PM_PLUS_35_OFT},
627   {"\007", 21.f, 21.f, PM_PLUS_40_OFT},
628   {"\010", 23.f, 23.f, PM_PLUS_45_OFT},
629   {"\011", 25.f, 25.f, PM_PLUS_50_OFT},
630   {"\012", 27.f, 27.f, PM_PLUS_55_OFT},
631   {"\013", 29.f, 29.f, PM_PLUS_60_OFT},
632   {"\014", 31.f, 31.f, PM_PLUS_65_OFT},
633   {"\015", 32.f, 32.f, PM_PLUS_70_OFT}},
634
635  /* TOM_STAR */
636  {{"\016",  7.f,  9.f, PM_STAR_10_OFT},
637   {"\017",  9.f, 11.f, PM_STAR_15_OFT},
638   {"\020", 11.f, 13.f, PM_STAR_20_OFT},
639   {"\021", 13.f, 15.f, PM_STAR_25_OFT},
640   {"\022", 13.f, 17.f, PM_STAR_30_OFT},
641   {"\023", 15.f, 19.f, PM_STAR_35_OFT},
642   {"\024", 17.f, 21.f, PM_STAR_40_OFT},
643   {"\025", 19.f, 23.f, PM_STAR_45_OFT},
644   {"\026", 21.f, 25.f, PM_STAR_50_OFT},
645   {"\027", 23.f, 27.f, PM_STAR_55_OFT},
646   {"\030", 25.f, 29.f, PM_STAR_60_OFT},
647   {"\031", 32.f, 32.f, PM_STAR_65_OFT},
648   {"\032", 32.f, 32.f, PM_STAR_70_OFT}},
649
650  /* TOM_O */
651  {{"\033",  7.f,  7.f, PM_CIRC_10_OFT},
652   {"\034",  9.f,  9.f, PM_CIRC_15_OFT},
653   {"\035",  9.f,  9.f, PM_CIRC_20_OFT},
654   {"\036", 11.f, 11.f, PM_CIRC_25_OFT},
655   {"\037", 13.f, 13.f, PM_CIRC_30_OFT},
656   {"\040", 15.f, 15.f, PM_CIRC_35_OFT},
657   {"\041", 17.f, 17.f, PM_CIRC_40_OFT},
658   {"\042", 19.f, 19.f, PM_CIRC_45_OFT},
659   {"\043", 21.f, 21.f, PM_CIRC_50_OFT},
660   {"\044", 23.f, 23.f, PM_CIRC_55_OFT},
661   {"\045", 25.f, 25.f, PM_CIRC_60_OFT},
662   {"\046", 27.f, 27.f, PM_CIRC_65_OFT},
663   {"\047", 29.f, 29.f, PM_CIRC_70_OFT}},
664
665  /* TOM_X */
666  {{"\050",  7.f,  7.f, PM_CROSS_10_OFT},
667   {"\051",  9.f,  9.f, PM_CROSS_15_OFT},
668   {"\052", 11.f, 11.f, PM_CROSS_20_OFT},
669   {"\053", 13.f, 13.f, PM_CROSS_25_OFT},
670   {"\054", 15.f, 15.f, PM_CROSS_30_OFT},
671   {"\055", 17.f, 17.f, PM_CROSS_35_OFT},
672   {"\056", 19.f, 19.f, PM_CROSS_40_OFT},
673   {"\057", 21.f, 21.f, PM_CROSS_45_OFT},
674   {"\060", 23.f, 23.f, PM_CROSS_50_OFT},
675   {"\061", 25.f, 25.f, PM_CROSS_55_OFT},
676   {"\062", 27.f, 27.f, PM_CROSS_60_OFT},
677   {"\063", 32.f, 32.f, PM_CROSS_65_OFT},
678   {"\064", 32.f, 32.f, PM_CROSS_70_OFT}},
679
680  /* TOM_O_POINT - not used */
681  {{"\0"},
682   {"\0"},
683   {"\0"},
684   {"\0"},
685   {"\0"},
686   {"\0"},
687   {"\0"},
688   {"\0"},
689   {"\0"},
690   {"\0"},
691   {"\0"},
692   {"\0"},
693   {"\0"}},
694
695  /* TOM_O_PLUS */
696  {{"\001\033"},
697   {"\002\034"},
698   {"\003\035"},
699   {"\004\036"},
700   {"\005\037"},
701   {"\006\040"},
702   {"\007\041"},
703   {"\010\042"},
704   {"\011\043"},
705   {"\012\044"},
706   {"\013\045"},
707   {"\014\046"},
708   {"\015\047"}},
709
710  /* TOM_O_STAR */
711  {{"\016\033"},
712   {"\017\034"},
713   {"\020\035"},
714   {"\021\036"},
715   {"\022\037"},
716   {"\023\040"},
717   {"\024\041"},
718   {"\025\042"},
719   {"\026\043"},
720   {"\027\044"},
721   {"\030\045"},
722   {"\031\046"},
723   {"\032\047"}},
724
725  /* TOM_O_X */
726  {{"\050\033"},
727   {"\051\034"},
728   {"\052\035"},
729   {"\053\036"},
730   {"\054\037"},
731   {"\055\040"},
732   {"\056\041"},
733   {"\057\042"},
734   {"\060\043"},
735   {"\061\044"},
736   {"\062\045"},
737   {"\063\046"},
738   {"\064\047"}}
739 };
740
741 static const unsigned char myMarkerRaster[] =
742 {
743     /* TYPE = PLUS */
744
745     0x08,0x00,
746     0x08,0x00,
747     0x08,0x00,
748     0x08,0x00,
749     0xff,0x80,
750     0x08,0x00,
751     0x08,0x00,
752     0x08,0x00,
753     0x08,0x00,  /* PLUS 9x9 = 1.0 */
754
755     0x04,0x00,
756     0x04,0x00,
757     0x04,0x00,
758     0x04,0x00,
759     0x04,0x00,
760     0xff,0xe0,
761     0x04,0x00,
762     0x04,0x00,
763     0x04,0x00,
764     0x04,0x00,
765     0x04,0x00,  /* PLUS 11x11 = 1.5 */
766
767     0x02,0x00,
768     0x02,0x00,
769     0x02,0x00,
770     0x02,0x00,
771     0x02,0x00,
772     0x02,0x00,
773     0xff,0xf8,
774     0x02,0x00,
775     0x02,0x00,
776     0x02,0x00,
777     0x02,0x00,
778     0x02,0x00,
779     0x02,0x00,/* PLUS 13x13 = 2.0 */
780
781     0x01,0x00,
782     0x01,0x00,
783     0x01,0x00,
784     0x01,0x00,
785     0x01,0x00,
786     0x01,0x00,
787     0x01,0x00,
788     0xff,0xfe,
789     0x01,0x00,
790     0x01,0x00,
791     0x01,0x00,
792     0x01,0x00,
793     0x01,0x00,
794     0x01,0x00,
795     0x01,0x00,/* PLUS 15x15 = 2.5 */
796
797     0x00,0x80, 0x00,
798     0x00,0x80, 0x00,
799     0x00,0x80, 0x00,
800     0x00,0x80, 0x00,
801     0x00,0x80, 0x00,
802     0x00,0x80, 0x00,
803     0x00,0x80, 0x00,
804     0x00,0x80, 0x00,
805     0xff,0xff, 0x80,
806     0x00,0x80, 0x00,
807     0x00,0x80, 0x00,
808     0x00,0x80, 0x00,
809     0x00,0x80, 0x00,
810     0x00,0x80, 0x00,
811     0x00,0x80, 0x00,
812     0x00,0x80, 0x00,
813     0x00,0x80, 0x00,/* PLUS 17x17 = 3.0 */
814
815     0x00,0x40, 0x00,
816     0x00,0x40, 0x00,
817     0x00,0x40, 0x00,
818     0x00,0x40, 0x00,
819     0x00,0x40, 0x00,
820     0x00,0x40, 0x00,
821     0x00,0x40, 0x00,
822     0x00,0x40, 0x00,
823     0x00,0x40, 0x00,
824     0xff,0xff, 0xe0,
825     0x00,0x40, 0x00,
826     0x00,0x40, 0x00,
827     0x00,0x40, 0x00,
828     0x00,0x40, 0x00,
829     0x00,0x40, 0x00,
830     0x00,0x40, 0x00,
831     0x00,0x40, 0x00,
832     0x00,0x40, 0x00,
833     0x00,0x40, 0x00,/* PLUS 19x19 = 3.5 */
834
835     0x00,0x20, 0x00,
836     0x00,0x20, 0x00,
837     0x00,0x20, 0x00,
838     0x00,0x20, 0x00,
839     0x00,0x20, 0x00,
840     0x00,0x20, 0x00,
841     0x00,0x20, 0x00,
842     0x00,0x20, 0x00,
843     0x00,0x20, 0x00,
844     0x00,0x20, 0x00,
845     0xff,0xff, 0xf8,
846     0x00,0x20, 0x00,
847     0x00,0x20, 0x00,
848     0x00,0x20, 0x00,
849     0x00,0x20, 0x00,
850     0x00,0x20, 0x00,
851     0x00,0x20, 0x00,
852     0x00,0x20, 0x00,
853     0x00,0x20, 0x00,
854     0x00,0x20, 0x00,
855     0x00,0x20, 0x00,/* PLUS 21x21 = 4.0 */
856
857     0x00,0x10, 0x00,
858     0x00,0x10, 0x00,
859     0x00,0x10, 0x00,
860     0x00,0x10, 0x00,
861     0x00,0x10, 0x00,
862     0x00,0x10, 0x00,
863     0x00,0x10, 0x00,
864     0x00,0x10, 0x00,
865     0x00,0x10, 0x00,
866     0x00,0x10, 0x00,
867     0x00,0x10, 0x00,
868     0xff,0xff, 0xfe,
869     0x00,0x10, 0x00,
870     0x00,0x10, 0x00,
871     0x00,0x10, 0x00,
872     0x00,0x10, 0x00,
873     0x00,0x10, 0x00,
874     0x00,0x10, 0x00,
875     0x00,0x10, 0x00,
876     0x00,0x10, 0x00,
877     0x00,0x10, 0x00,
878     0x00,0x10, 0x00,
879     0x00,0x10, 0x00,/* PLUS 23x23 = 4.5 */
880
881     0x00,0x08, 0x00,0x00,
882     0x00,0x08, 0x00,0x00,
883     0x00,0x08, 0x00,0x00,
884     0x00,0x08, 0x00,0x00,
885     0x00,0x08, 0x00,0x00,
886     0x00,0x08, 0x00,0x00,
887     0x00,0x08, 0x00,0x00,
888     0x00,0x08, 0x00,0x00,
889     0x00,0x08, 0x00,0x00,
890     0x00,0x08, 0x00,0x00,
891     0x00,0x08, 0x00,0x00,
892     0x00,0x08, 0x00,0x00,
893     0xff,0xff, 0xff,0x80,
894     0x00,0x08, 0x00,0x00,
895     0x00,0x08, 0x00,0x00,
896     0x00,0x08, 0x00,0x00,
897     0x00,0x08, 0x00,0x00,
898     0x00,0x08, 0x00,0x00,
899     0x00,0x08, 0x00,0x00,
900     0x00,0x08, 0x00,0x00,
901     0x00,0x08, 0x00,0x00,
902     0x00,0x08, 0x00,0x00,
903     0x00,0x08, 0x00,0x00,
904     0x00,0x08, 0x00,0x00,
905     0x00,0x08, 0x00,0x00,/* PLUS 25x25 = 5.0 */
906
907     0x00,0x04, 0x00,0x00,
908     0x00,0x04, 0x00,0x00,
909     0x00,0x04, 0x00,0x00,
910     0x00,0x04, 0x00,0x00,
911     0x00,0x04, 0x00,0x00,
912     0x00,0x04, 0x00,0x00,
913     0x00,0x04, 0x00,0x00,
914     0x00,0x04, 0x00,0x00,
915     0x00,0x04, 0x00,0x00,
916     0x00,0x04, 0x00,0x00,
917     0x00,0x04, 0x00,0x00,
918     0x00,0x04, 0x00,0x00,
919     0x00,0x04, 0x00,0x00,
920     0xff,0xff, 0xff,0xe0,
921     0x00,0x04, 0x00,0x00,
922     0x00,0x04, 0x00,0x00,
923     0x00,0x04, 0x00,0x00,
924     0x00,0x04, 0x00,0x00,
925     0x00,0x04, 0x00,0x00,
926     0x00,0x04, 0x00,0x00,
927     0x00,0x04, 0x00,0x00,
928     0x00,0x04, 0x00,0x00,
929     0x00,0x04, 0x00,0x00,
930     0x00,0x04, 0x00,0x00,
931     0x00,0x04, 0x00,0x00,
932     0x00,0x04, 0x00,0x00,
933     0x00,0x04, 0x00,0x00,/* PLUS 27x27 = 5.5 */
934
935     0x00,0x02, 0x00,0x00,
936     0x00,0x02, 0x00,0x00,
937     0x00,0x02, 0x00,0x00,
938     0x00,0x02, 0x00,0x00,
939     0x00,0x02, 0x00,0x00,
940     0x00,0x02, 0x00,0x00,
941     0x00,0x02, 0x00,0x00,
942     0x00,0x02, 0x00,0x00,
943     0x00,0x02, 0x00,0x00,
944     0x00,0x02, 0x00,0x00,
945     0x00,0x02, 0x00,0x00,
946     0x00,0x02, 0x00,0x00,
947     0x00,0x02, 0x00,0x00,
948     0x00,0x02, 0x00,0x00,
949     0xff,0xff, 0xff,0xf8,
950     0x00,0x02, 0x00,0x00,
951     0x00,0x02, 0x00,0x00,
952     0x00,0x02, 0x00,0x00,
953     0x00,0x02, 0x00,0x00,
954     0x00,0x02, 0x00,0x00,
955     0x00,0x02, 0x00,0x00,
956     0x00,0x02, 0x00,0x00,
957     0x00,0x02, 0x00,0x00,
958     0x00,0x02, 0x00,0x00,
959     0x00,0x02, 0x00,0x00,
960     0x00,0x02, 0x00,0x00,
961     0x00,0x02, 0x00,0x00,
962     0x00,0x02, 0x00,0x00,
963     0x00,0x02, 0x00,0x00,/* PLUS 29x29 = 6.0 */
964
965     0x00,0x01, 0x00,0x00,
966     0x00,0x01, 0x00,0x00,
967     0x00,0x01, 0x00,0x00,
968     0x00,0x01, 0x00,0x00,
969     0x00,0x01, 0x00,0x00,
970     0x00,0x01, 0x00,0x00,
971     0x00,0x01, 0x00,0x00,
972     0x00,0x01, 0x00,0x00,
973     0x00,0x01, 0x00,0x00,
974     0x00,0x01, 0x00,0x00,
975     0x00,0x01, 0x00,0x00,
976     0x00,0x01, 0x00,0x00,
977     0x00,0x01, 0x00,0x00,
978     0x00,0x01, 0x00,0x00,
979     0x00,0x01, 0x00,0x00,
980     0xff,0xff, 0xff,0xfd,
981     0x00,0x01, 0x00,0x00,
982     0x00,0x01, 0x00,0x00,
983     0x00,0x01, 0x00,0x00,
984     0x00,0x01, 0x00,0x00,
985     0x00,0x01, 0x00,0x00,
986     0x00,0x01, 0x00,0x00,
987     0x00,0x01, 0x00,0x00,
988     0x00,0x01, 0x00,0x00,
989     0x00,0x01, 0x00,0x00,
990     0x00,0x01, 0x00,0x00,
991     0x00,0x01, 0x00,0x00,
992     0x00,0x01, 0x00,0x00,
993     0x00,0x01, 0x00,0x00,
994     0x00,0x01, 0x00,0x00,
995     0x00,0x01, 0x00,0x00,/* PLUS 31x31 = 6.5 */
996
997     0x00,0x00, 0x80,0x00,
998     0x00,0x00, 0x80,0x00,
999     0x00,0x00, 0x80,0x00,
1000     0x00,0x00, 0x80,0x00,
1001     0x00,0x00, 0x80,0x00,
1002     0x00,0x00, 0x80,0x00,
1003     0x00,0x00, 0x80,0x00,
1004     0x00,0x00, 0x80,0x00,
1005     0x00,0x00, 0x80,0x00,
1006     0x00,0x00, 0x80,0x00,
1007     0x00,0x00, 0x80,0x00,
1008     0x00,0x00, 0x80,0x00,
1009     0x00,0x00, 0x80,0x00,
1010     0x00,0x00, 0x80,0x00,
1011     0x00,0x00, 0x80,0x00,
1012     0x00,0x00, 0x80,0x00,
1013     0xff,0xff, 0xff,0xff,
1014     0x00,0x00, 0x80,0x00,
1015     0x00,0x00, 0x80,0x00,
1016     0x00,0x00, 0x80,0x00,
1017     0x00,0x00, 0x80,0x00,
1018     0x00,0x00, 0x80,0x00,
1019     0x00,0x00, 0x80,0x00,
1020     0x00,0x00, 0x80,0x00,
1021     0x00,0x00, 0x80,0x00,
1022     0x00,0x00, 0x80,0x00,
1023     0x00,0x00, 0x80,0x00,
1024     0x00,0x00, 0x80,0x00,
1025     0x00,0x00, 0x80,0x00,
1026     0x00,0x00, 0x80,0x00,
1027     0x00,0x00, 0x80,0x00,
1028     0x00,0x00, 0x80,0x00,/* PLUS 32x32 = 7.0 */
1029
1030     /* TYPE = STAR */
1031
1032     0x10,
1033     0x10,
1034     0xd6,
1035     0x38,
1036     0x10,
1037     0x38,
1038     0xd6,
1039     0x10,
1040     0x10,/* STAR 7x9 = 1.0 */
1041
1042     0x08,0x00,
1043     0x08,0x00,
1044     0x08,0x00,
1045     0xc9,0x80,
1046     0x3e,0x00,
1047     0x08,0x00,
1048     0x3e,0x00,
1049     0xc9,0x80,
1050     0x08,0x00,
1051     0x08,0x00,
1052     0x08,0x00,/* STAR 9x11 = 1.5 */
1053
1054     0x04,0x00,
1055     0x04,0x00,
1056     0x04,0x00,
1057     0x84,0x20,
1058     0x64,0xc0,
1059     0x1f,0x00,
1060     0x04,0x00,
1061     0x1f,0x00,
1062     0x64,0xc0,
1063     0x84,0x20,
1064     0x04,0x00,
1065     0x04,0x00,
1066     0x04,0x00,/* STAR 11x13 = 2.0 */
1067
1068     0x02,0x00,
1069     0x02,0x00,
1070     0x02,0x00,
1071     0x02,0x00,
1072     0x82,0x18,
1073     0x62,0x60,
1074     0x1b,0x80,
1075     0x06,0x00,
1076     0x1b,0x80,
1077     0x62,0x60,
1078     0x82,0x18,
1079     0x02,0x00,
1080     0x02,0x00,
1081     0x02,0x00,
1082     0x02,0x00,/* STAR 13x15 = 2.5 */
1083
1084     0x02,0x00,
1085     0x02,0x00,
1086     0x02,0x00,
1087     0x02,0x00,
1088     0x82,0x08,
1089     0x62,0x30,
1090     0x12,0x40,
1091     0x0f,0x80,
1092     0x02,0x00,
1093     0x0f,0x80,
1094     0x12,0x40,
1095     0x62,0x30,
1096     0x82,0x08,
1097     0x02,0x00,
1098     0x02,0x00,
1099     0x02,0x00,
1100     0x02,0x00,/* STAR 13x17 = 3.0 */
1101
1102     0x01,0x00,
1103     0x01,0x00,
1104     0x01,0x00,
1105     0x01,0x00,
1106     0x01,0x00,
1107     0xc1,0x06,
1108     0x21,0x18,
1109     0x19,0x20,
1110     0x07,0xc0,
1111     0x01,0x00,
1112     0x07,0xc0,
1113     0x19,0x20,
1114     0x21,0x18,
1115     0xc1,0x06,
1116     0x01,0x00,
1117     0x01,0x00,
1118     0x01,0x00,
1119     0x01,0x00,
1120     0x01,0x00,/* STAR 15x19 = 3.5 */
1121
1122     0x00,0x80, 0x00,
1123     0x00,0x80, 0x00,
1124     0x00,0x80, 0x00,
1125     0x00,0x80, 0x00,
1126     0x00,0x80, 0x00,
1127     0x80,0x80, 0x80,
1128     0x60,0x83, 0x00,
1129     0x10,0x8c, 0x00,
1130     0x0c,0x90, 0x00,
1131     0x03,0xe0, 0x00,
1132     0x00,0x80, 0x00,
1133     0x03,0xe0, 0x00,
1134     0x0c,0x90, 0x00,
1135     0x10,0x8c, 0x00,
1136     0x60,0x83, 0x00,
1137     0x80,0x80, 0x80,
1138     0x00,0x80, 0x00,
1139     0x00,0x80, 0x00,
1140     0x00,0x80, 0x00,
1141     0x00,0x80, 0x00,
1142     0x00,0x80, 0x00,/* STAR 17x21 = 4.0 */
1143
1144     0x00,0x40, 0x00,
1145     0x00,0x40, 0x00,
1146     0x00,0x40, 0x00,
1147     0x00,0x40, 0x00,
1148     0x00,0x40, 0x00,
1149     0x00,0x40, 0x00,
1150     0xc0,0x40, 0x60,
1151     0x30,0x41, 0x80,
1152     0x08,0x42, 0x00,
1153     0x06,0x4c, 0x00,
1154     0x01,0xf0, 0x00,
1155     0x00,0x40, 0x00,
1156     0x01,0xf0, 0x00,
1157     0x06,0x4c, 0x00,
1158     0x08,0x42, 0x00,
1159     0x30,0x41, 0x80,
1160     0xc0,0x40, 0x60,
1161     0x00,0x40, 0x00,
1162     0x00,0x40, 0x00,
1163     0x00,0x40, 0x00,
1164     0x00,0x40, 0x00,
1165     0x00,0x40, 0x00,
1166     0x00,0x40, 0x00,/* STAR 19x23 = 4.5 */
1167
1168     0x00,0x20, 0x00,
1169     0x00,0x20, 0x00,
1170     0x00,0x20, 0x00,
1171     0x00,0x20, 0x00,
1172     0x00,0x20, 0x00,
1173     0x00,0x20, 0x00,
1174     0x80,0x20, 0x08,
1175     0x60,0x20, 0x30,
1176     0x18,0x20, 0xc0,
1177     0x04,0x21, 0x00,
1178     0x03,0x26, 0x00,
1179     0x00,0xf8, 0x00,
1180     0x00,0x20, 0x00,
1181     0x00,0xf8, 0x00,
1182     0x03,0x26, 0x00,
1183     0x04,0x21, 0x00,
1184     0x18,0x20, 0xc0,
1185     0x60,0x20, 0x30,
1186     0x80,0x20, 0x08,
1187     0x00,0x20, 0x00,
1188     0x00,0x20, 0x00,
1189     0x00,0x20, 0x00,
1190     0x00,0x20, 0x00,
1191     0x00,0x20, 0x00,
1192     0x00,0x20, 0x00,/* STAR 21x25 = 5.0 */
1193
1194     0x00,0x10, 0x00,
1195     0x00,0x10, 0x00,
1196     0x00,0x10, 0x00,
1197     0x00,0x10, 0x00,
1198     0x00,0x10, 0x00,
1199     0x00,0x10, 0x00,
1200     0x00,0x10, 0x00,
1201     0xc0,0x10, 0x06,
1202     0x30,0x10, 0x18,
1203     0x08,0x10, 0x60,
1204     0x06,0x10, 0x80,
1205     0x01,0x93, 0x00,
1206     0x00,0x7c, 0x00,
1207     0x00,0x10, 0x00,
1208     0x00,0x7c, 0x00,
1209     0x01,0x93, 0x00,
1210     0x06,0x10, 0x80,
1211     0x08,0x10, 0x60,
1212     0x30,0x10, 0x18,
1213     0xc0,0x10, 0x06,
1214     0x00,0x10, 0x00,
1215     0x00,0x10, 0x00,
1216     0x00,0x10, 0x00,
1217     0x00,0x10, 0x00,
1218     0x00,0x10, 0x00,
1219     0x00,0x10, 0x00,
1220     0x00,0x10, 0x00,/* STAR 23x27 = 5.5 */
1221
1222     0x00,0x08, 0x00,0x00,
1223     0x00,0x08, 0x00,0x00,
1224     0x00,0x08, 0x00,0x00,
1225     0x00,0x08, 0x00,0x00,
1226     0x00,0x08, 0x00,0x00,
1227     0x00,0x08, 0x00,0x00,
1228     0x00,0x08, 0x00,0x00,
1229     0x80,0x08, 0x00,0x80,
1230     0x60,0x08, 0x03,0x00,
1231     0x18,0x08, 0x0c,0x00,
1232     0x04,0x08, 0x30,0x00,
1233     0x03,0x08, 0x40,0x00,
1234     0x00,0xc9, 0x80,0x00,
1235     0x00,0x3e, 0x00,0x00,
1236     0x00,0x08, 0x00,0x00,
1237     0x00,0x3e, 0x00,0x00,
1238     0x00,0xc9, 0x80,0x00,
1239     0x03,0x08, 0x40,0x00,
1240     0x04,0x08, 0x30,0x00,
1241     0x18,0x08, 0x0c,0x00,
1242     0x60,0x08, 0x03,0x00,
1243     0x80,0x08, 0x00,0x80,
1244     0x00,0x08, 0x00,0x00,
1245     0x00,0x08, 0x00,0x00,
1246     0x00,0x08, 0x00,0x00,
1247     0x00,0x08, 0x00,0x00,
1248     0x00,0x08, 0x00,0x00,
1249     0x00,0x08, 0x00,0x00,
1250     0x00,0x08, 0x00,0x00,/* STAR 25x29 = 6.0 */
1251
1252     0x00,0x00, 0x80,0x00,
1253     0x00,0x00, 0x80,0x00,
1254     0x00,0x00, 0x80,0x00,
1255     0x00,0x00, 0x80,0x00,
1256     0x00,0x00, 0x80,0x00,
1257     0x00,0x00, 0x80,0x00,
1258     0x00,0x00, 0x80,0x00,
1259     0x00,0x00, 0x80,0x00, 
1260     0x00,0x00, 0x80,0x00,
1261     0x30,0x00, 0x80,0x06,
1262     0x0c,0x00, 0x80,0x18,
1263     0x03,0x00, 0x80,0x60,
1264     0x00,0xc0, 0x81,0x80,
1265     0x00,0x30, 0x86,0x00,
1266     0x00,0x0c, 0x98,0x00,
1267     0x00,0x03, 0xe0,0x00,
1268     0x00,0x03, 0xe0,0x00,
1269     0x00,0x0c, 0x98,0x00,
1270     0x00,0x30, 0x86,0x00,
1271     0x00,0xc0, 0x81,0x80,
1272     0x03,0x00, 0x80,0x60,
1273     0x0c,0x00, 0x80,0x18,
1274     0x30,0x00, 0x80,0x06,
1275     0x00,0x00, 0x80,0x00,
1276     0x00,0x00, 0x80,0x00,
1277     0x00,0x00, 0x80,0x00,
1278     0x00,0x00, 0x80,0x00,
1279     0x00,0x00, 0x80,0x00,
1280     0x00,0x00, 0x80,0x00,
1281     0x00,0x00, 0x80,0x00,
1282     0x00,0x00, 0x00,0x00,
1283     0x00,0x00, 0x00,0x00,/* STAR 32x32 = 6.5 */
1284
1285     0x00, 0x00, 0x80, 0x00,
1286     0x00, 0x00, 0x80, 0x00,
1287     0x00, 0x00, 0x80, 0x00,
1288     0x00, 0x00, 0x80, 0x00,
1289     0x00, 0x00, 0x80, 0x00,
1290     0x00, 0x00, 0x80, 0x00,
1291     0x00, 0x00, 0x80, 0x00, 
1292     0x00, 0x00, 0x80, 0x00,
1293     0x10, 0x00, 0x80, 0x04,
1294     0x0c, 0x00, 0x80, 0x18,
1295     0x02, 0x00, 0x80, 0x20,
1296     0x01, 0x80, 0x80, 0xc0,
1297     0x00, 0x40, 0x81, 0x00,
1298     0x00, 0x30, 0x86, 0x00,
1299     0x00, 0x08, 0x88, 0x00,
1300     0x00, 0x06, 0xb0, 0x00,
1301     0x00, 0x01, 0xc0, 0x00,
1302     0x00, 0x06, 0xb0, 0x00,
1303     0x00, 0x08, 0x88, 0x00,
1304     0x00, 0x30, 0x86, 0x00,
1305     0x00, 0x40, 0x81, 0x00,
1306     0x01, 0x80, 0x80, 0xc0,
1307     0x02, 0x00, 0x80, 0x20,
1308     0x0c, 0x00, 0x80, 0x18,
1309     0x10, 0x00, 0x80, 0x04,
1310     0x00, 0x00, 0x80, 0x00,
1311     0x00, 0x00, 0x80, 0x00,
1312     0x00, 0x00, 0x80, 0x00,
1313     0x00, 0x00, 0x80, 0x00,
1314     0x00, 0x00, 0x80, 0x00,
1315     0x00, 0x00, 0x80, 0x00,
1316     0x00, 0x00, 0x80, 0x00,/* STAR 32x32 = 7.0 */
1317
1318       /* TYPE = CIRC */
1319
1320     0x38,
1321     0x44,
1322     0x82,
1323     0x82,
1324     0x82,
1325     0x44,
1326     0x38,/* CIRC 7x7 = 1.0 */
1327
1328     0x3c,0x00,
1329     0x42,0x00,
1330     0x81,0x00,
1331     0x81,0x00,
1332     0x81,0x00,
1333     0x81,0x00,
1334     0x42,0x00,
1335     0x3c,0x00,
1336     0x00,0x00,/*CIRC 9x9 = 1.5 */
1337
1338     0x3e, 0x00,
1339     0x41, 0x00,
1340     0x81, 0x80,
1341     0x80,0x80,
1342     0x80,0x80,
1343     0x80,0x80,
1344     0x81, 0x80,
1345     0x41, 0x00,
1346     0x3e,0x00,/* CIRC 9x9 = 2.0 */
1347
1348     0x1f,0x00,
1349     0x20,0x80,
1350     0x40,0x40,
1351     0x80,0x20,
1352     0x80,0x20,
1353     0x80,0x20,
1354     0x80,0x20,
1355     0x80,0x20,
1356     0x40,0x40,
1357     0x20,0x80,
1358     0x1f,0x00,/* CIRC 11x11 = 2.5 */
1359
1360     0x0f,0x80,
1361     0x10,0x40,
1362     0x20,0x20,
1363     0x40,0x10,
1364     0x80,0x08,
1365     0x80,0x08,
1366     0x80,0x08,
1367     0x80,0x08,
1368     0x80,0x08,
1369     0x40,0x10,
1370     0x20,0x20,
1371     0x10,0x40,
1372     0x0f,0x80,/* CIRC 13x13 = 3.0 */
1373
1374     0x07,0xc0,
1375     0x18,0x30,
1376     0x20,0x08,
1377     0x40,0x04,
1378     0x40,0x04,
1379     0x80,0x02,
1380     0x80,0x02,
1381     0x80,0x02,
1382     0x80,0x02,
1383     0x80,0x02,
1384     0x40,0x04,
1385     0x40,0x04,
1386     0x20,0x08,
1387     0x18,0x30,
1388     0x07,0xc0,/* CIRC 15x15 = 3.5 */
1389
1390     0x03,0xe0, 0x00,
1391     0x0c,0x18, 0x00,
1392     0x10,0x04, 0x00,
1393     0x20,0x02, 0x00,
1394     0x40,0x01, 0x00,
1395     0x40,0x01, 0x00,
1396     0x80,0x00, 0x80,
1397     0x80,0x00, 0x80,
1398     0x80,0x00, 0x80,
1399     0x80,0x00, 0x80,
1400     0x80,0x00, 0x80,
1401     0x40,0x01, 0x00,
1402     0x40,0x01, 0x00,
1403     0x20,0x02, 0x00,
1404     0x10,0x04, 0x00,
1405     0x0c,0x18, 0x00,
1406     0x03,0xe0, 0x00,/* CIRC 17x17 = 4.0 */
1407
1408     0x03,0xf8, 0x00,
1409     0x0e,0x0e, 0x00,
1410     0x18,0x03, 0x00,
1411     0x20,0x00, 0x80,
1412     0x60,0x00, 0xc0,
1413     0x40,0x00, 0x40,
1414     0xc0,0x00, 0x60,
1415     0x80,0x00, 0x20,
1416     0x80,0x00, 0x20,
1417     0x80,0x00, 0x20,
1418     0x80,0x00, 0x20,
1419     0x80,0x00, 0x20,
1420     0xc0,0x00, 0x60,
1421     0x40,0x00, 0x40,
1422     0x60,0x00, 0xc0,
1423     0x20,0x00, 0x80,
1424     0x18,0x03, 0x00,
1425     0x0e,0x0e, 0x00,
1426     0x03,0xf8, 0x00,/* CIRC 19x19 = 4.5 */
1427
1428     0x01,0xfc, 0x00,
1429     0x06,0x03, 0x00,
1430     0x08,0x00, 0x80,
1431     0x10,0x00, 0x40,
1432     0x20,0x00, 0x20,
1433     0x40,0x00, 0x10,
1434     0x40,0x00, 0x10,
1435     0x80,0x00, 0x08,
1436     0x80,0x00, 0x08,
1437     0x80,0x00, 0x08,
1438     0x80,0x00, 0x08,
1439     0x80,0x00, 0x08,
1440     0x80,0x00, 0x08,
1441     0x80,0x00, 0x08,
1442     0x40,0x00, 0x10,
1443     0x40,0x00, 0x10,
1444     0x20,0x00, 0x20,
1445     0x10,0x00, 0x40,
1446     0x08,0x00, 0x80,
1447     0x06,0x03, 0x00,
1448     0x01,0xfc, 0x00,/* CIRC 21x21 = 5.0 */
1449
1450     0x00,0xfe, 0x00,
1451     0x03,0x01, 0x80,
1452     0x0c,0x00, 0x60,
1453     0x18,0x00, 0x30,
1454     0x30,0x00, 0x18,
1455     0x20,0x00, 0x08,
1456     0x40,0x00, 0x04,
1457     0x40,0x00, 0x04,
1458     0x80,0x00, 0x02,
1459     0x80,0x00, 0x02,
1460     0x80,0x00, 0x02,
1461     0x80,0x00, 0x02,
1462     0x80,0x00, 0x02,
1463     0x80,0x00, 0x02,
1464     0x80,0x00, 0x02,
1465     0x40,0x00, 0x04,
1466     0x40,0x00, 0x04,
1467     0x20,0x00, 0x08,
1468     0x30,0x00, 0x18,
1469     0x18,0x00, 0x30,
1470     0x0c,0x00, 0x60,
1471     0x03,0x01, 0x80,
1472     0x00,0xfe, 0x00,/* CIRC 23x23 = 5.5 */
1473
1474     0x00,0x7f, 0x00,0x00,
1475     0x01,0x80, 0xc0,0x00,
1476     0x06,0x00, 0x30,0x00,
1477     0x08,0x00, 0x08,0x00,
1478     0x10,0x00, 0x04,0x00,
1479     0x20,0x00, 0x02,0x00,
1480     0x20,0x00, 0x02,0x00,
1481     0x40,0x00, 0x01,0x00,
1482     0x40,0x00, 0x01,0x00,
1483     0x80,0x00, 0x00,0x80,
1484     0x80,0x00, 0x00,0x80,
1485     0x80,0x00, 0x00,0x80,
1486     0x80,0x00, 0x00,0x80,
1487     0x80,0x00, 0x00,0x80,
1488     0x80,0x00, 0x00,0x80,
1489     0x80,0x00, 0x00,0x80,
1490     0x40,0x00, 0x01,0x00,
1491     0x40,0x00, 0x01,0x00,
1492     0x20,0x00, 0x02,0x00,
1493     0x20,0x00, 0x02,0x00,
1494     0x10,0x00, 0x04,0x00,
1495     0x08,0x00, 0x08,0x00,
1496     0x06,0x00, 0x30,0x00,
1497     0x01,0x80, 0xc0,0x00,
1498     0x00,0x7f, 0x00,0x00,/* CIRC 25x25 = 6.0 */
1499
1500     0x00,0x3f, 0x80,0x00,
1501     0x01,0xc0, 0x70,0x00,
1502     0x03,0x00, 0x18,0x00,
1503     0x0c,0x00, 0x06,0x00,
1504     0x18,0x00, 0x03,0x00,
1505     0x10,0x00, 0x01,0x00,
1506     0x20,0x00, 0x00,0x80,
1507     0x60,0x00, 0x00,0xc0,
1508     0x40,0x00, 0x00,0x40,
1509     0x40,0x00, 0x00,0x40,
1510     0x80,0x00, 0x00,0x20,
1511     0x80,0x00, 0x00,0x20,
1512     0x80,0x00, 0x00,0x20,
1513     0x80,0x00, 0x00,0x20,
1514     0x80,0x00, 0x00,0x20,
1515     0x80,0x00, 0x00,0x20,
1516     0x80,0x00, 0x00,0x20,
1517     0x40,0x00, 0x00,0x40,
1518     0x40,0x00, 0x00,0x40,
1519     0x60,0x00, 0x00,0xc0,
1520     0x20,0x00, 0x00,0x80,
1521     0x10,0x00, 0x01,0x00,
1522     0x18,0x00, 0x03,0x00,
1523     0x0c,0x00, 0x06,0x00,
1524     0x03,0x00, 0x18,0x00,
1525     0x01,0xc0, 0x70,0x00,
1526     0x00,0x3f, 0x80,0x00,/* CIRC 27x27 = 6.5 */
1527
1528     0x00,0x1f, 0xc0,0x00,
1529     0x00,0xe0, 0x38,0x00,
1530     0x01,0x00, 0x04,0x00,
1531     0x06,0x00, 0x03,0x00,
1532     0x08,0x00, 0x00,0x80,
1533     0x10,0x00, 0x00,0x40,
1534     0x10,0x00, 0x00,0x40,
1535     0x20,0x00, 0x00,0x20,
1536     0x40,0x00, 0x00,0x10,
1537     0x40,0x00, 0x00,0x10,
1538     0x40,0x00, 0x00,0x10,
1539     0x80,0x00, 0x00,0x08,
1540     0x80,0x00, 0x00,0x08,
1541     0x80,0x00, 0x00,0x08,
1542     0x80,0x00, 0x00,0x08,
1543     0x80,0x00, 0x00,0x08,
1544     0x80,0x00, 0x00,0x08,
1545     0x80,0x00, 0x00,0x08,
1546     0x40,0x00, 0x00,0x10,
1547     0x40,0x00, 0x00,0x10,
1548     0x40,0x00, 0x00,0x10,
1549     0x20,0x00, 0x00,0x20,
1550     0x10,0x00, 0x00,0x40,
1551     0x10,0x00, 0x00,0x40,
1552     0x08,0x00, 0x00,0x80,
1553     0x06,0x00, 0x03,0x00,
1554     0x01,0x00, 0x04,0x00,
1555     0x00,0xe0, 0x38,0x00,
1556     0x00,0x1f, 0xc0,0x00, /* CIRC 29x29 = 7.0 */
1557
1558       /* TYPE = CROSS */
1559
1560     0x82,
1561     0x44,
1562     0x28,
1563     0x10,
1564     0x28,
1565     0x44,
1566     0x82,/* CROSS 7x7 = 1.0 */
1567
1568     0x80,0x80,
1569     0x41,0x00,
1570     0x22,0x00,
1571     0x14,0x00,
1572     0x08,0x00,
1573     0x14,0x00,
1574     0x22,0x00,
1575     0x41,0x00,
1576     0x80,0x80,/* CROSS 9x9 = 1.5 */
1577
1578     0x80,0x20,
1579     0x40,0x40,
1580     0x20,0x80,
1581     0x11,0x00,
1582     0x0a,0x00,
1583     0x04,0x00,
1584     0x0a,0x00,
1585     0x11,0x00,
1586     0x20,0x80,
1587     0x40,0x40,
1588     0x80,0x20,/* CROSS 11x11 = 2.0 */
1589
1590     0x80,0x08,
1591     0x40,0x10,
1592     0x20,0x20,
1593     0x10,0x40,
1594     0x08,0x80,
1595     0x05,0x00,
1596     0x02,0x00,
1597     0x05,0x00,
1598     0x08,0x80,
1599     0x10,0x40,
1600     0x20,0x20,
1601     0x40,0x10,
1602     0x80,0x08,/* CROSS 13x13 = 2.5 */
1603
1604     0x80,0x02,
1605     0x40,0x04,
1606     0x20,0x08,
1607     0x10,0x10,
1608     0x08,0x20,
1609     0x04,0x40,
1610     0x02,0x80,
1611     0x01,0x00,
1612     0x02,0x80,
1613     0x04,0x40,
1614     0x08,0x20,
1615     0x10,0x10,
1616     0x20,0x08,
1617     0x40,0x04,
1618     0x80,0x02,/* CROSS 15x15 = 3.0 */
1619
1620     0x80,0x00, 0x80,
1621     0x40,0x01, 0x00,
1622     0x20,0x02, 0x00,
1623     0x10,0x04, 0x00,
1624     0x08,0x08, 0x00,
1625     0x04,0x10, 0x00,
1626     0x02,0x20, 0x00,
1627     0x01,0x40, 0x00,
1628     0x00,0x80, 0x00,
1629     0x01,0x40, 0x00,
1630     0x02,0x20, 0x00,
1631     0x04,0x10, 0x00,
1632     0x08,0x08, 0x00,
1633     0x10,0x04, 0x00,
1634     0x20,0x02, 0x00,
1635     0x40,0x01, 0x00,
1636     0x80,0x00, 0x80,/* CROSS 17x17 = 3.5 */
1637
1638     0x80,0x00, 0x20,
1639     0x40,0x00, 0x40,
1640     0x20,0x00, 0x80,
1641     0x10,0x01, 0x00,
1642     0x08,0x02, 0x00,
1643     0x04,0x04, 0x00,
1644     0x02,0x08, 0x00,
1645     0x01,0x10, 0x00,
1646     0x00,0xa0, 0x00,
1647     0x00,0x40, 0x00,
1648     0x00,0xa0, 0x00,
1649     0x01,0x10, 0x00,
1650     0x02,0x08, 0x00,
1651     0x04,0x04, 0x00,
1652     0x08,0x02, 0x00,
1653     0x10,0x01, 0x00,
1654     0x20,0x00, 0x80,
1655     0x40,0x00, 0x40,
1656     0x80,0x00, 0x20,/* CROSS 19x19 = 4.0 */
1657
1658     0x80,0x00, 0x08,
1659     0x40,0x00, 0x10,
1660     0x20,0x00, 0x20,
1661     0x10,0x00, 0x40,
1662     0x08,0x00, 0x80,
1663     0x04,0x01, 0x00,
1664     0x02,0x02, 0x00,
1665     0x01,0x04, 0x00,
1666     0x00,0x88, 0x00,
1667     0x00,0x50, 0x00,
1668     0x00,0x20, 0x00,
1669     0x00,0x50, 0x00,
1670     0x00,0x88, 0x00,
1671     0x01,0x04, 0x00,
1672     0x02,0x02, 0x00,
1673     0x04,0x01, 0x00,
1674     0x08,0x00, 0x80,
1675     0x10,0x00, 0x40,
1676     0x20,0x00, 0x20,
1677     0x40,0x00, 0x10,
1678     0x80,0x00, 0x08,/* CROSS 21x21 = 4.5 */
1679
1680     0x80,0x00, 0x02,
1681     0x40,0x00, 0x04,
1682     0x20,0x00, 0x08,
1683     0x10,0x00, 0x10,
1684     0x08,0x00, 0x20,
1685     0x04,0x00, 0x40,
1686     0x02,0x00, 0x80,
1687     0x01,0x01, 0x00,
1688     0x00,0x82, 0x00,
1689     0x00,0x44, 0x00,
1690     0x00,0x28, 0x00,
1691     0x00,0x10, 0x00,
1692     0x00,0x28, 0x00,
1693     0x00,0x44, 0x00,
1694     0x00,0x82, 0x00,
1695     0x01,0x01, 0x00,
1696     0x02,0x00, 0x80,
1697     0x04,0x00, 0x40,
1698     0x08,0x00, 0x20,
1699     0x10,0x00, 0x10,
1700     0x20,0x00, 0x08,
1701     0x40,0x00, 0x04,
1702     0x80,0x00, 0x02,/* CROSS 23x23 = 5.0 */
1703
1704     0x80,0x00, 0x00,0x80,
1705     0x40,0x00, 0x01,0x00,
1706     0x20,0x00, 0x02,0x00,
1707     0x10,0x00, 0x04,0x00,
1708     0x08,0x00, 0x08,0x00,
1709     0x04,0x00, 0x10,0x00,
1710     0x02,0x00, 0x20,0x00,
1711     0x01,0x00, 0x40,0x00,
1712     0x00,0x80, 0x80,0x00,
1713     0x00,0x41, 0x00,0x00,
1714     0x00,0x22, 0x00,0x00,
1715     0x00,0x14, 0x00,0x00,
1716     0x00,0x08, 0x00,0x00,
1717     0x00,0x14, 0x00,0x00,
1718     0x00,0x22, 0x00,0x00,
1719     0x00,0x41, 0x00,0x00,
1720     0x00,0x80, 0x80,0x00,
1721     0x01,0x00, 0x40,0x00,
1722     0x02,0x00, 0x20,0x00,
1723     0x04,0x00, 0x10,0x00,
1724     0x08,0x00, 0x08,0x00,
1725     0x10,0x00, 0x04,0x00,
1726     0x20,0x00, 0x02,0x00,
1727     0x40,0x00, 0x01,0x00,
1728     0x80,0x00, 0x00,0x80,/* CROSS 25x25 = 5.5 */
1729
1730     0x80,0x00, 0x00,0x20,
1731     0x40,0x00, 0x00,0x40,
1732     0x20,0x00, 0x00,0x80,
1733     0x10,0x00, 0x01,0x00,
1734     0x08,0x00, 0x02,0x00,
1735     0x04,0x00, 0x04,0x00,
1736     0x02,0x00, 0x08,0x00,
1737     0x01,0x00, 0x10,0x00,
1738     0x00,0x80, 0x20,0x00,
1739     0x00,0x40, 0x40,0x00,
1740     0x00,0x20, 0x80,0x00,
1741     0x00,0x11, 0x00,0x00,
1742     0x00,0x0a, 0x00,0x00,
1743     0x00,0x04, 0x00,0x00,
1744     0x00,0x0a, 0x00,0x00,
1745     0x00,0x11, 0x00,0x00,
1746     0x00,0x20, 0x80,0x00,
1747     0x00,0x40, 0x40,0x00,
1748     0x00,0x80, 0x20,0x00,
1749     0x01,0x00, 0x10,0x00,
1750     0x02,0x00, 0x08,0x00,
1751     0x04,0x00, 0x04,0x00,
1752     0x08,0x00, 0x02,0x00,
1753     0x10,0x00, 0x01,0x00,
1754     0x20,0x00, 0x00,0x80,
1755     0x40,0x00, 0x00,0x40,
1756     0x80,0x00, 0x00,0x20,/* CROSS 27x27 = 6.0 */
1757
1758     0x00,0x00, 0x00,0x00,
1759     0x00,0x00, 0x00,0x00,
1760     0x20,0x00, 0x00,0x04,
1761     0x10,0x00, 0x00,0x08,
1762     0x08,0x00, 0x00,0x10,
1763     0x04,0x00, 0x00,0x20,
1764     0x02,0x00, 0x00,0x40,
1765     0x01,0x00, 0x00,0x80,
1766     0x00,0x80, 0x01,0x00,
1767     0x00,0x40, 0x02,0x00,
1768     0x00,0x20, 0x04,0x00,
1769     0x00,0x10, 0x08,0x00,
1770     0x00,0x08, 0x10,0x00,
1771     0x00,0x04, 0x20,0x00,
1772     0x00,0x02, 0x40,0x00,
1773     0x00,0x01, 0x80,0x00,
1774     0x00,0x01, 0x80,0x00,
1775     0x00,0x02, 0x40,0x00,
1776     0x00,0x04, 0x20,0x00,
1777     0x00,0x08, 0x10,0x00,
1778     0x00,0x10, 0x08,0x00,
1779     0x00,0x20, 0x04,0x00,
1780     0x00,0x40, 0x02,0x00,
1781     0x00,0x80, 0x01,0x00,
1782     0x01,0x00, 0x00,0x80,
1783     0x02,0x00, 0x00,0x40, 
1784     0x04,0x00, 0x00,0x20,
1785     0x08,0x00, 0x00,0x10,
1786     0x10,0x00, 0x00,0x08,
1787     0x20,0x00, 0x00,0x04,
1788     0x00,0x00, 0x00,0x00,
1789     0x00,0x00, 0x00,0x00,/* CROSS 32x32 = 6.5 */
1790
1791     0x00,0x00, 0x00,0x00,
1792     0x40,0x00, 0x00,0x02,
1793     0x20,0x00, 0x00,0x04,
1794     0x10,0x00, 0x00,0x08,
1795     0x08,0x00, 0x00,0x10,
1796     0x04,0x00, 0x00,0x20,
1797     0x02,0x00, 0x00,0x40,
1798     0x01,0x00, 0x00,0x80,
1799     0x00,0x80, 0x01,0x00,
1800     0x00,0x40, 0x02,0x00,
1801     0x00,0x20, 0x04,0x00,
1802     0x00,0x10, 0x08,0x00,
1803     0x00,0x08, 0x10,0x00,
1804     0x00,0x04, 0x20,0x00,
1805     0x00,0x02, 0x40,0x00,
1806     0x00,0x01, 0x80,0x00,
1807     0x00,0x01, 0x80,0x00,
1808     0x00,0x02, 0x40,0x00,
1809     0x00,0x04, 0x20,0x00,
1810     0x00,0x08, 0x10,0x00,
1811     0x00,0x10, 0x08,0x00,
1812     0x00,0x20, 0x04,0x00,
1813     0x00,0x40, 0x02,0x00, 
1814     0x00,0x80, 0x01,0x00,
1815     0x01,0x00, 0x00,0x80,
1816     0x02,0x00, 0x00,0x40,
1817     0x04,0x00, 0x00,0x20,
1818     0x08,0x00, 0x00,0x10,
1819     0x10,0x00, 0x00,0x08,
1820     0x20,0x00, 0x00,0x04,
1821     0x40,0x00, 0x00,0x02,
1822     0x00,0x00, 0x00,0x00/* CROSS 32x32 = 7.0 */
1823 };
1824
1825 /*----------------------------------------------------------------------*/
1826
1827 //TsmInitAttributes
1828 void OpenGl_Display::InitAttributes ()
1829 {
1830   // Return if already initialized
1831   if (myLinestyleBase) return;
1832
1833   myLinestyleBase = glGenLists(5);
1834
1835   /* Line */
1836
1837   glNewList( (GLuint)myLinestyleBase+(GLuint)Aspect_TOL_DASH, GL_COMPILE );
1838   glLineStipple(1,  DASH_LS );
1839   glEndList();
1840
1841   glNewList( (GLuint)myLinestyleBase+(GLuint)Aspect_TOL_DOT, GL_COMPILE );
1842   glLineStipple(1,  DOT_LS );
1843   glEndList();
1844
1845   glNewList( (GLuint)myLinestyleBase+(GLuint)Aspect_TOL_DOTDASH, GL_COMPILE );
1846   glLineStipple(1,  DASH_DOT_LS );
1847   glEndList();
1848
1849   glNewList( (GLuint)myLinestyleBase+(GLuint)Aspect_TOL_USERDEFINED, GL_COMPILE );
1850   glLineStipple(1,  DASH_DDOT_LS );
1851   glEndList();
1852
1853   /* FSXXX
1854   * GL_POLYGON_STIPPLE
1855   * need 32x32 stipple patterns
1856   */
1857   const int nbi = sizeof(myInteriors)/(32*sizeof(unsigned int));
1858   myPatternBase = glGenLists(TEL_HS_USER_DEF_START);
1859   int i;
1860   for( i = 1; i < TEL_HS_USER_DEF_START; i++ )
1861   {
1862     glNewList( (GLuint)myPatternBase + i, GL_COMPILE );
1863         glPolygonStipple((const GLubyte *) (myInteriors[i<nbi? i : 0]));
1864     glEndList();
1865   }
1866
1867   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
1868
1869   myMarkerBase = glGenLists (60);
1870   int j;
1871   for( i = 1; i < TEL_NB_OF_LISTS; i++ )
1872     for( j = 0; j < TEL_NO_OF_SIZES; j++ )
1873     {           
1874       const Tfloat w = arrPMFontInfo[i][j].width;
1875       const Tfloat h = arrPMFontInfo[i][j].height;
1876       const Tint offset = arrPMFontInfo[i][j].offset;
1877
1878       glNewList( (const GLuint)(arrPMFontInfo[i][j].str[0] + myMarkerBase), GL_COMPILE );
1879       glBitmap( (GLsizei)w, (GLsizei)h, (GLfloat)(0.5f * w), (GLfloat)(0.5f * h), 0.f, 0.f, (const GLubyte *) &myMarkerRaster[offset] );
1880       glEndList();
1881     }
1882 }
1883
1884 /*----------------------------------------------------------------------*/
1885
1886 #define TEL_PM_START_SIZE 1.F
1887 #define TEL_PM_END_SIZE   7.F
1888
1889 //TelGetStringForPM
1890 const char * OpenGl_Display::GetStringForMarker (const Aspect_TypeOfMarker AType, const Tfloat AVal) const
1891 {
1892   const int atype = (int)(( AType > Aspect_TOM_O_X )? Aspect_TOM_X : AType);
1893
1894   const float index = ( float )(TEL_NO_OF_SIZES-1) * (AVal - ( float )TEL_PM_START_SIZE ) / ( float )(TEL_PM_END_SIZE - TEL_PM_START_SIZE);
1895   int id = (int)(index + 0.5F);
1896   if (id < 0) id = 0;
1897   else if (id >= TEL_NO_OF_SIZES) id = TEL_NO_OF_SIZES-1;
1898
1899   return arrPMFontInfo[atype][id].str;
1900 }
1901
1902 /*----------------------------------------------------------------------*/
1903
1904 void OpenGl_Display::SetBaseForMarker () const
1905 {
1906   glListBase( (const GLuint) myMarkerBase );
1907 }
1908
1909 /*----------------------------------------------------------------------*/
1910
1911 void OpenGl_Display::SetTypeOfLine (const Aspect_TypeOfLine AType) const
1912 {
1913   if (AType != Aspect_TOL_SOLID)
1914   {
1915     glCallList((GLuint)myLinestyleBase+(GLuint)AType);
1916     glEnable( GL_LINE_STIPPLE );
1917 #ifdef HAVE_GL2PS
1918     gl2psEnable( GL2PS_LINE_STIPPLE );
1919 #endif
1920   }
1921   else
1922   {
1923     glDisable( GL_LINE_STIPPLE );
1924 #ifdef HAVE_GL2PS
1925     gl2psDisable( GL2PS_LINE_STIPPLE );
1926 #endif
1927   }
1928 }
1929
1930 /*----------------------------------------------------------------------*/
1931
1932 void OpenGl_Display::SetTypeOfHatch (const int AType) const
1933 {
1934   if (AType)
1935   {
1936     glCallList((GLuint)myPatternBase+(GLuint)AType);
1937     glEnable( GL_POLYGON_STIPPLE );
1938   }
1939   else
1940     glDisable( GL_POLYGON_STIPPLE );
1941 }
1942
1943 /*----------------------------------------------------------------------*/