/* * Copyright (c) 1993-1997, Silicon Graphics, Inc. * ALL RIGHTS RESERVED * Permission to use, copy, modify, and distribute this software for * any purpose and without fee is hereby granted, provided that the above * copyright notice appear in all copies and that both the copyright notice * and this permission notice appear in supporting documentation, and that * the name of Silicon Graphics, Inc. not be used in advertising * or publicity pertaining to distribution of the software without specific, * written prior permission. * * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. * * US Government Users Restricted Rights * Use, duplication, or disclosure by the Government is subject to * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph * (c)(1)(ii) of the Rights in Technical Data and Computer Software * clause at DFARS 252.227-7013 and/or in similar or successor * clauses in the FAR or the DOD or NASA FAR Supplement. * Unpublished-- rights reserved under the copyright laws of the * United States. Contractor/manufacturer is Silicon Graphics, * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. * * OpenGL(R) is a registered trademark of Silicon Graphics, Inc. */ /* * font.c * * Draws some text in a bitmapped font. Uses glBitmap() * and other pixel routines. Also demonstrates use of * display lists. */ /* Modifie par: Nicolas JANEY */ /* nicolas.janey@univ-fcomte.fr */ /* Septembre 2005 */ #include #include #include #include #include #include #include "ModuleFont.h" static GLubyte dessin[256][13] = { /* */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ! */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* " */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* # */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* $ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* % */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* & */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ' */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ( */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ) */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* * */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* + */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* , */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* - */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* . */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* / */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 0 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 1 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 2 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 3 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 4 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 5 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 6 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 7 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 8 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 9 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* : */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ; */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* < */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* = */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* > */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ? */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* @ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* A */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* B */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* C */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* D */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* E */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* F */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0xFE,0x04,0x08}, /* G */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* H */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* I */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* J */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* K */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* L */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* M */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* N */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* O */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* P */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* Q */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* R */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* S */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* T */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00}, /* U */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* V */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* W */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* X */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* Y */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* Z */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* [ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* \ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ] */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ^ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* _ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ` */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* a */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* b */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* c */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* d */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* e */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* f */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x20,0x7F,0x20,0x10}, /* g */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* h */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* i */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* j */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* k */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* l */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* m */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* n */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* o */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* p */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* q */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* r */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* s */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* t */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00}, /* u */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* v */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* w */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* x */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* y */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* z */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* { */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* | */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* } */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ~ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} }; static GLubyte symbol[256][13] = { /* */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ! */ {0x00,0x10,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00}, /* " */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x28,0x00,0x00}, /* # */ {0x00,0x00,0x00,0x48,0xfc,0x48,0x48,0xfc,0x48,0x00,0x00,0x00,0x00}, /* $ */ {0x00,0x28,0x7c,0xaa,0x2a,0x2a,0x5c,0xa8,0xa8,0xaa,0x7c,0x28,0x00}, /* % */ {0x00,0x0c,0x12,0x92,0x4c,0x20,0x10,0x08,0x64,0x92,0x90,0x60,0x00}, /* & */ {0x00,0x76,0x88,0x94,0x92,0x60,0x20,0x20,0x40,0x40,0x30,0x00,0x00}, /* ' */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x18,0x18,0x00,0x00}, /* ( */ {0x00,0x04,0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x08,0x08,0x04,0x00}, /* ) */ {0x00,0x10,0x08,0x08,0x04,0x04,0x04,0x04,0x04,0x08,0x08,0x10,0x00}, /* * */ {0x00,0x00,0x10,0x54,0x38,0xfe,0x38,0x54,0x10,0x00,0x00,0x00,0x00}, /* + */ {0x00,0x00,0x10,0x10,0x10,0xfe,0x10,0x10,0x10,0x00,0x00,0x00,0x00}, /* , */ {0x30,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* - */ {0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* . */ {0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* / */ {0x00,0x80,0x80,0x40,0x20,0x20,0x10,0x08,0x08,0x04,0x02,0x02,0x00}, /* 0 */ {0x00,0x38,0x44,0x82,0xc2,0xa2,0x92,0x8a,0x86,0x82,0x44,0x38,0x00}, /* 1 */ {0x00,0xfe,0x10,0x10,0x10,0x10,0x10,0x10,0x90,0x50,0x30,0x10,0x00}, /* 2 */ {0x00,0xfe,0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x02,0x82,0x7c,0x00}, /* 3 */ {0x00,0x7c,0x82,0x02,0x02,0x02,0x7c,0x02,0x02,0x02,0x82,0x7c,0x00}, /* 4 */ {0x04,0x04,0x04,0x04,0x04,0xfe,0x44,0x24,0x24,0x14,0x0c,0x04,0x00}, /* 5 */ {0x00,0x7c,0x82,0x02,0x02,0x02,0xfc,0x80,0x80,0x80,0x80,0xfe,0x00}, /* 6 */ {0x00,0x7c,0x82,0x82,0x82,0x82,0xfc,0x80,0x80,0x80,0x82,0x7e,0x00}, /* 7 */ {0x00,0x40,0x40,0x40,0x40,0x20,0x10,0x08,0x04,0x02,0x02,0xfe,0x00}, /* 8 */ {0x00,0x7c,0x82,0x82,0x82,0x82,0x7c,0x82,0x82,0x82,0x82,0x7c,0x00}, /* 9 */ {0x00,0x7c,0x82,0x02,0x02,0x02,0x7e,0x82,0x82,0x82,0x82,0x7c,0x00}, /* : */ {0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00}, /* ; */ {0x30,0x18,0x18,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00}, /* < */ {0x00,0x04,0x08,0x10,0x20,0x40,0x80,0x40,0x20,0x10,0x08,0x04,0x00}, /* = */ {0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xfc,0x00,0x00,0x00,0x00,0x00}, /* > */ {0x00,0x80,0x40,0x20,0x10,0x08,0x04,0x08,0x10,0x20,0x40,0x80,0x00}, /* ? */ {0x00,0x10,0x00,0x10,0x10,0x08,0x04,0x02,0x02,0x82,0x82,0x7c,0x00}, /* @ */ {0x00,0x3e,0x40,0x9c,0xa2,0xa2,0x9a,0x82,0x7c,0x00,0x00,0x00,0x00}, /* A */{0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xff,0xc3,0xc3,0xc3,0x66,0x3c,0x18}, /* B */{0x00,0x00,0xfe,0xc7,0xc3,0xc3,0xc7,0xfe,0xc7,0xc3,0xc3,0xc7,0xfe}, /* C */{0x00,0x00,0x7e,0xe7,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xe7,0x7e}, /* D */{0x00,0x00,0xfc,0xce,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc7,0xce,0xfc}, /* E */{0x00,0x00,0xff,0xc0,0xc0,0xc0,0xc0,0xfc,0xc0,0xc0,0xc0,0xc0,0xff}, /* F */{0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xfc,0xc0,0xc0,0xc0,0xff}, /* G */{0x00,0x00,0x7e,0xe7,0xc3,0xc3,0xcf,0xc0,0xc0,0xc0,0xc0,0xe7,0x7e}, /* H */{0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xff,0xc3,0xc3,0xc3,0xc3,0xc3}, /* I */{0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7e}, /* J */{0x00,0x00,0x7c,0xee,0xc6,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06}, /* K */{0x00,0x00,0xc3,0xc6,0xcc,0xd8,0xf0,0xe0,0xf0,0xd8,0xcc,0xc6,0xc3}, /* L */{0x00,0x00,0xff,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0}, /* M */{0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xdb,0xff,0xff,0xe7,0xc3}, /* N */{0x00,0x00,0xc7,0xc7,0xcf,0xcf,0xdf,0xdb,0xfb,0xf3,0xf3,0xe3,0xe3}, /* O */{0x00,0x00,0x7e,0xe7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe7,0x7e}, /* P */{0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0xfe,0xc7,0xc3,0xc3,0xc7,0xfe}, /* Q */{0x00,0x00,0x3f,0x6e,0xdf,0xdb,0xc3,0xc3,0xc3,0xc3,0xc3,0x66,0x3c}, /* R */{0x00,0x00,0xc3,0xc6,0xcc,0xd8,0xf0,0xfe,0xc7,0xc3,0xc3,0xc7,0xfe}, /* S */{0x00,0x00,0x7e,0xe7,0x03,0x03,0x07,0x7e,0xe0,0xc0,0xc0,0xe7,0x7e}, /* T */{0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff}, /* U */{0x00,0x00,0x7e,0xe7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3}, /* V */{0x00,0x00,0x18,0x3c,0x3c,0x66,0x66,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3}, /* W */{0x00,0x00,0xc3,0xe7,0xff,0xff,0xdb,0xdb,0xc3,0xc3,0xc3,0xc3,0xc3}, /* X */{0x00,0x00,0xc3,0x66,0x66,0x3c,0x3c,0x18,0x3c,0x3c,0x66,0x66,0xc3}, /* Y */{0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x3c,0x66,0x66,0xc3}, /* Z */{0x00,0x00,0xff,0xc0,0xc0,0x60,0x30,0x7e,0x0c,0x06,0x03,0x03,0xff}, /* [ */ {0x00,0x00,0x1c,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x1c,0x00}, /* \ */ {0x00,0x02,0x02,0x04,0x08,0x08,0x10,0x20,0x20,0x40,0x80,0x80,0x00}, /* ] */ {0x00,0x00,0x70,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x70,0x00}, /* ^ */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x44,0x28,0x10,0x00}, /* _ */ {0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ` */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x18,0x18,0x00,0x00}, /* a */ {0x00,0x72,0x8a,0x84,0x84,0x8a,0x4a,0x30,0x00,0x00,0x00,0x00,0x00}, /* b */ {0x80,0x9c,0xa2,0x42,0x42,0x44,0x58,0x64,0x22,0x22,0x1c,0x00,0x00}, /* c */ {0x00,0x8c,0x48,0x48,0x30,0x30,0x30,0x28,0x28,0x44,0xc4,0x00,0x00}, /* d */ {0x00,0x70,0x88,0x88,0x88,0x88,0x50,0x20,0x40,0x48,0x30,0x00,0x00}, /* e */ {0x00,0x70,0x88,0x80,0x40,0x30,0x40,0x48,0x38,0x00,0x00,0x00,0x00}, /* f */ {0x20,0x20,0x20,0x78,0x94,0x92,0x92,0x52,0x3c,0x08,0x08,0x08,0x00}, /* g */ {0x20,0x20,0x10,0x10,0x18,0x18,0x18,0x24,0xa4,0x44,0x00,0x00,0x00}, /* h */ {0x08,0x08,0x08,0x24,0x24,0x24,0x12,0x12,0xb2,0x4c,0x00,0x00,0x00}, /* i */ {0x00,0x00,0x00,0x10,0x28,0x20,0x20,0x10,0x10,0x10,0x00,0x00,0x00}, /* j */ {0x00,0x40,0x40,0x78,0xa4,0xa2,0x92,0x92,0x52,0x4c,0x00,0x00,0x00}, /* k */ {0x00,0x00,0x00,0x98,0x90,0xf0,0x50,0x50,0x48,0x48,0x00,0x00,0x00}, /* l */ {0x00,0x00,0x8c,0x88,0x88,0x50,0x50,0x50,0x20,0x20,0x40,0xc0,0x00}, /* m */ {0x00,0x80,0x80,0x80,0x74,0x4a,0x48,0x48,0x24,0x24,0x24,0x00,0x00}, /* n */ {0x00,0x00,0x00,0xc0,0xa0,0x90,0x90,0x48,0x48,0xc8,0x00,0x00,0x00}, /* o */ {0x00,0x00,0x00,0x60,0x90,0x88,0x88,0x88,0x48,0x30,0x00,0x00,0x00}, /* p */ {0x00,0x00,0x00,0x8c,0x48,0x48,0x24,0x24,0xa4,0x7e,0x00,0x00,0x00}, /* q */ {0x00,0x30,0x48,0x84,0x84,0x84,0xfc,0x84,0x84,0x84,0x48,0x30,0x00}, /* r */ {0x00,0x80,0x80,0x80,0x70,0x48,0x44,0x24,0x24,0x24,0x18,0x00,0x00}, /* s */ {0x00,0x00,0x00,0x60,0x90,0x88,0x88,0x88,0x48,0x3e,0x00,0x00,0x00}, /* t */ {0x00,0x00,0x0c,0x40,0x20,0x20,0x20,0x20,0xa0,0x78,0x00,0x00,0x00}, /* u */ {0x00,0x00,0x00,0xc0,0xa0,0x90,0x90,0x48,0x48,0xc8,0x00,0x00,0x00}, /* v */ {0x00,0x00,0x00,0x6c,0x92,0x91,0x89,0x49,0x41,0xFF,0x00,0x00,0x00}, /* w */ {0x00,0x00,0x00,0x6c,0x92,0x91,0x89,0x49,0x41,0x22,0x00,0x00,0x00}, /* x */ {0x30,0x08,0x70,0x80,0x80,0x70,0xb0,0x80,0x80,0x70,0xb0,0x80,0x00}, /* y */ {0x00,0x20,0x20,0x20,0x78,0x94,0x94,0x52,0x4a,0xca,0x08,0x08,0x00}, /* z */ {0x30,0x08,0x70,0x80,0x80,0x80,0x80,0x80,0x40,0x70,0xb0,0x80,0x00}, /* { */ {0x00,0x0c,0x10,0x10,0x10,0x10,0x60,0x10,0x10,0x10,0x10,0x0c,0x00}, /* | */ {0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00}, /* } */ {0x00,0x60,0x10,0x10,0x10,0x10,0x0c,0x10,0x10,0x10,0x10,0x60,0x00}, /* ~ */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x89,0x91,0x60,0x00,0x00} }; static GLubyte regular6x10[256][10] = { /* */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ! */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* " */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* # */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* $ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* % */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* & */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ' */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ( */ {0x00,0x08,0x10,0x20,0x20,0x20,0x20,0x10,0x08,0x00}, /* ) */ {0x00,0x40,0x20,0x10,0x10,0x10,0x10,0x20,0x40,0x00}, /* * */ {0x00,0x00,0x00,0x50,0x20,0x50,0x00,0x00,0x00,0x00}, /* + */ {0x00,0x00,0x00,0x20,0x70,0x20,0x00,0x00,0x00,0x00}, /* , */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* - */ {0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00}, /* . */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* / */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 0 */ {0x00,0x70,0x88,0xc8,0xa8,0xa8,0x98,0x88,0x70,0x00}, /* 1 */ {0x00,0x70,0x20,0x20,0x20,0x20,0xa0,0x60,0x20,0x00}, /* 2 */ {0x00,0xF8,0x80,0x40,0x20,0x10,0x08,0x88,0x70,0x00}, /* 3 */ {0x00,0x70,0x88,0x08,0x30,0x08,0x08,0x88,0x70,0x00}, /* 4 */ {0x00,0x38,0x10,0xF8,0x90,0x50,0x50,0x30,0x10,0x00}, /* 5 */ {0x00,0x70,0x88,0x08,0xF0,0x80,0x80,0x80,0xF8,0x00}, /* 6 */ {0x00,0x70,0x88,0x88,0xF0,0x80,0x80,0x40,0x30,0x00}, /* 7 */ {0x00,0x40,0x40,0x20,0x20,0x10,0x10,0x88,0xF8,0x00}, /* 8 */ {0x00,0x70,0x88,0x88,0x70,0x88,0x88,0x88,0x70,0x00}, /* 9 */ {0x00,0x30,0x10,0x08,0x78,0x88,0x88,0x88,0x70,0x00}, /* : */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ; */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* < */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* = */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* > */ {0x00,0x40,0x20,0x10,0x08,0x10,0x20,0x40,0x00,0x00}, /* ? */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* @ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* A */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* B */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* C */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* D */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* E */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* F */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* G */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* H */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* I */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* J */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* K */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* L */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* M */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* N */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* O */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* P */ {0x00,0x80,0x80,0x80,0xF0,0x88,0x88,0x88,0xF0,0x00}, /* Q */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* R */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* S */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* T */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* U */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* V */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* W */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* X */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* Y */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* Z */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* [ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* \ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ] */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ^ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* _ */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ` */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* a */ {0x00,0x34,0x48,0x48,0x38,0x08,0x30,0x00,0x00,0x00}, /* b */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* c */ {0x00,0x30,0x48,0x40,0x40,0x48,0x30,0x00,0x00,0x00}, /* d */ {0x00,0x70,0x88,0x88,0x88,0x98,0x68,0x08,0x08,0x00}, /* e */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* f */ {0x00,0x40,0x40,0x40,0x70,0x40,0x40,0x30,0x00,0x00}, /* g */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* h */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* i */ {0x00,0x40,0x40,0x40,0x40,0x40,0x00,0x40,0x00,0x00}, /* j */ {0x40,0x20,0x20,0x20,0x20,0x00,0x20,0x00,0x00,0x00}, /* k */ {0x00,0x44,0x68,0x50,0x48,0x40,0x40,0x40,0x00,0x00}, /* l */ {0x00,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x00}, /* m */ {0x00,0x54,0x54,0x54,0x54,0x68,0x00,0x00,0x00,0x00}, /* n */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* o */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* p */ {0x80,0xF0,0x88,0x88,0x88,0x70,0x00,0x00,0x00,0x00}, /* q */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* r */ {0x00,0x40,0x40,0x40,0x40,0x70,0x00,0x00,0x00,0x00}, /* s */ {0x00,0x70,0x08,0x70,0x80,0x70,0x00,0x00,0x00,0x00}, /* t */ {0x00,0x20,0x40,0x40,0x40,0x60,0x40,0x40,0x00,0x00}, /* u */ {0x00,0x70,0x88,0x88,0x88,0x88,0x00,0x00,0x00,0x00}, /* v */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* w */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* x */ {0x00,0x00,0x88,0x50,0x20,0x50,0x88,0x00,0x00,0x00}, /* y */ {0x80,0x40,0x40,0x20,0x20,0x50,0x88,0x00,0x00,0x00}, /* z */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* { */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* | */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* } */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ~ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} }; static GLubyte regular8x13[256][13] = { /* */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ! */{0x00,0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18}, /* " */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x36,0x36,0x36}, /* # */{0x00,0x00,0x00,0x66,0x66,0xff,0x66,0x66,0xff,0x66,0x66,0x00,0x00}, /* $ */{0x00,0x00,0x18,0x7e,0xff,0x1b,0x1f,0x7e,0xf8,0xd8,0xff,0x7e,0x18}, /* % */{0x00,0x00,0x0e,0x1b,0xdb,0x6e,0x30,0x18,0x0c,0x76,0xdb,0xd8,0x70}, /* & */{0x00,0x00,0x7f,0xc6,0xcf,0xd8,0x70,0x70,0xd8,0xcc,0xcc,0x6c,0x38}, /* ' */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x1c,0x0c,0x0e}, /* ( */{0x00,0x00,0x0c,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0c}, /* ) */{0x00,0x00,0x30,0x18,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x18,0x30}, /* * */{0x00,0x00,0x00,0x00,0x99,0x5a,0x3c,0xff,0x3c,0x5a,0x99,0x00,0x00}, /* + */{0x00,0x00,0x00,0x18,0x18,0x18,0xff,0xff,0x18,0x18,0x18,0x00,0x00}, /* , */{0x00,0x00,0x30,0x18,0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* - */{0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,0x00,0x00,0x00,0x00,0x00}, /* . */{0x00,0x00,0x00,0x38,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* / */{0x00,0x60,0x60,0x30,0x30,0x18,0x18,0x0c,0x0c,0x06,0x06,0x03,0x03}, /* 0 */{0x00,0x00,0x3c,0x66,0xc3,0xe3,0xf3,0xdb,0xcf,0xc7,0xc3,0x66,0x3c}, /* 1 */{0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x38,0x18}, /* 2 */{0x00,0x00,0xff,0xc0,0xc0,0x60,0x30,0x18,0x0c,0x06,0x03,0xe7,0x7e}, /* 3 */{0x00,0x00,0x7e,0xe7,0x03,0x03,0x07,0x7e,0x07,0x03,0x03,0xe7,0x7e}, /* 4 */{0x00,0x00,0x0c,0x0c,0x0c,0x0c,0x0c,0xff,0xcc,0x6c,0x3c,0x1c,0x0c}, /* 5 */{0x00,0x00,0x7e,0xe7,0x03,0x03,0x07,0xfe,0xc0,0xc0,0xc0,0xc0,0xff}, /* 6 */{0x00,0x00,0x7e,0xe7,0xc3,0xc3,0xc7,0xfe,0xc0,0xc0,0xc0,0xe7,0x7e}, /* 7 */{0x00,0x00,0x30,0x30,0x30,0x30,0x18,0x0c,0x06,0x03,0x03,0x03,0xff}, /* 8 */{0x00,0x00,0x7e,0xe7,0xc3,0xc3,0xe7,0x7e,0xe7,0xc3,0xc3,0xe7,0x7e}, /* 9 */{0x00,0x00,0x7e,0xe7,0x03,0x03,0x03,0x7f,0xe7,0xc3,0xc3,0xe7,0x7e}, /* : */{0x00,0x00,0x00,0x38,0x38,0x00,0x00,0x38,0x38,0x00,0x00,0x00,0x00}, /* ; */{0x00,0x00,0x30,0x18,0x1c,0x1c,0x00,0x00,0x1c,0x1c,0x00,0x00,0x00}, /* < */{0x00,0x00,0x06,0x0c,0x18,0x30,0x60,0xc0,0x60,0x30,0x18,0x0c,0x06}, /* = */{0x00,0x00,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0x00,0x00,0x00}, /* > */{0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x03,0x06,0x0c,0x18,0x30,0x60}, /* ? */{0x00,0x00,0x18,0x00,0x00,0x18,0x18,0x0c,0x06,0x03,0xc3,0xc3,0x7e}, /* @ */{0x00,0x00,0x3f,0x60,0xcf,0xdb,0xd3,0xdd,0xc3,0x7e,0x00,0x00,0x00}, /* A */{0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xff,0xc3,0xc3,0xc3,0x66,0x3c,0x18}, /* B */{0x00,0x00,0xfe,0xc7,0xc3,0xc3,0xc7,0xfe,0xc7,0xc3,0xc3,0xc7,0xfe}, /* C */{0x00,0x00,0x7e,0xe7,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xe7,0x7e}, /* D */{0x00,0x00,0xfc,0xce,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc7,0xce,0xfc}, /* E */{0x00,0x00,0xff,0xc0,0xc0,0xc0,0xc0,0xfc,0xc0,0xc0,0xc0,0xc0,0xff}, /* F */{0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xfc,0xc0,0xc0,0xc0,0xff}, /* G */{0x00,0x00,0x7e,0xe7,0xc3,0xc3,0xcf,0xc0,0xc0,0xc0,0xc0,0xe7,0x7e}, /* H */{0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xff,0xc3,0xc3,0xc3,0xc3,0xc3}, /* I */{0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7e}, /* J */{0x00,0x00,0x7c,0xee,0xc6,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06}, /* K */{0x00,0x00,0xc3,0xc6,0xcc,0xd8,0xf0,0xe0,0xf0,0xd8,0xcc,0xc6,0xc3}, /* L */{0x00,0x00,0xff,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0}, /* M */{0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xdb,0xff,0xff,0xe7,0xc3}, /* N */{0x00,0x00,0xc7,0xc7,0xcf,0xcf,0xdf,0xdb,0xfb,0xf3,0xf3,0xe3,0xe3}, /* O */{0x00,0x00,0x7e,0xe7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe7,0x7e}, /* P */{0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0xfe,0xc7,0xc3,0xc3,0xc7,0xfe}, /* Q */{0x00,0x00,0x3f,0x6e,0xdf,0xdb,0xc3,0xc3,0xc3,0xc3,0xc3,0x66,0x3c}, /* R */{0x00,0x00,0xc3,0xc6,0xcc,0xd8,0xf0,0xfe,0xc7,0xc3,0xc3,0xc7,0xfe}, /* S */{0x00,0x00,0x7e,0xe7,0x03,0x03,0x07,0x7e,0xe0,0xc0,0xc0,0xe7,0x7e}, /* T */{0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff}, /* U */{0x00,0x00,0x7e,0xe7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3}, /* V */{0x00,0x00,0x18,0x3c,0x3c,0x66,0x66,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3}, /* W */{0x00,0x00,0xc3,0xe7,0xff,0xff,0xdb,0xdb,0xc3,0xc3,0xc3,0xc3,0xc3}, /* X */{0x00,0x00,0xc3,0x66,0x66,0x3c,0x3c,0x18,0x3c,0x3c,0x66,0x66,0xc3}, /* Y */{0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x3c,0x66,0x66,0xc3}, /* Z */{0x00,0x00,0xff,0xc0,0xc0,0x60,0x30,0x7e,0x0c,0x06,0x03,0x03,0xff}, /* [ */{0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c}, /* \ */{0x00,0x03,0x03,0x06,0x06,0x0c,0x0c,0x18,0x18,0x30,0x30,0x60,0x60}, /* ] */{0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c}, /* ^ */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc3,0x66,0x3c,0x18}, /* _ */{0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* ` */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x38,0x30,0x70}, /* a */{0x00,0x00,0x7f,0xc3,0xc3,0x7f,0x03,0xc3,0x7e,0x00,0x00,0x00,0x00}, /* b */{0x00,0x00,0xfe,0xc3,0xc3,0xc3,0xc3,0xfe,0xc0,0xc0,0xc0,0xc0,0xc0}, /* c */{0x00,0x00,0x7e,0xc3,0xc0,0xc0,0xc0,0xc3,0x7e,0x00,0x00,0x00,0x00}, /* d */{0x00,0x00,0x7f,0xc3,0xc3,0xc3,0xc3,0x7f,0x03,0x03,0x03,0x03,0x03}, /* e */{0x00,0x00,0x7f,0xc0,0xc0,0xfe,0xc3,0xc3,0x7e,0x00,0x00,0x00,0x00}, /* f */{0x00,0x00,0x30,0x30,0x30,0x30,0x30,0xfc,0x30,0x30,0x30,0x33,0x1e}, /* g */{0x7e,0xc3,0x03,0x03,0x7f,0xc3,0xc3,0xc3,0x7e,0x00,0x00,0x00,0x00}, /* h */{0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xfe,0xc0,0xc0,0xc0,0xc0}, /* i */{0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x18,0x00}, /* j */{0x38,0x6c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x00,0x00,0x0c,0x00}, /* k */{0x00,0x00,0xc6,0xcc,0xf8,0xf0,0xd8,0xcc,0xc6,0xc0,0xc0,0xc0,0xc0}, /* l */{0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78}, /* m */{0x00,0x00,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xfe,0x00,0x00,0x00,0x00}, /* n */{0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xfc,0x00,0x00,0x00,0x00}, /* o */{0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00}, /* p */{0xc0,0xc0,0xc0,0xfe,0xc3,0xc3,0xc3,0xc3,0xfe,0x00,0x00,0x00,0x00}, /* q */{0x03,0x03,0x03,0x7f,0xc3,0xc3,0xc3,0xc3,0x7f,0x00,0x00,0x00,0x00}, /* r */{0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0xe0,0xfe,0x00,0x00,0x00,0x00}, /* s */{0x00,0x00,0xfe,0x03,0x03,0x7e,0xc0,0xc0,0x7f,0x00,0x00,0x00,0x00}, /* t */{0x00,0x00,0x1c,0x36,0x30,0x30,0x30,0x30,0xfc,0x30,0x30,0x30,0x00}, /* u */{0x00,0x00,0x7e,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00}, /* v */{0x00,0x00,0x18,0x3c,0x3c,0x66,0x66,0xc3,0xc3,0x00,0x00,0x00,0x00}, /* w */{0x00,0x00,0xc3,0xe7,0xff,0xdb,0xc3,0xc3,0xc3,0x00,0x00,0x00,0x00}, /* x */{0x00,0x00,0xc3,0x66,0x3c,0x18,0x3c,0x66,0xc3,0x00,0x00,0x00,0x00}, /* y */{0xc0,0x60,0x60,0x30,0x18,0x3c,0x66,0x66,0xc3,0x00,0x00,0x00,0x00}, /* z */{0x00,0x00,0xff,0x60,0x30,0x18,0x0c,0x06,0xff,0x00,0x00,0x00,0x00}, /* { */{0x00,0x00,0x0f,0x18,0x18,0x18,0x38,0xf0,0x38,0x18,0x18,0x18,0x0f}, /* | */{0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}, /* } */{0x00,0x00,0xf0,0x18,0x18,0x18,0x1c,0x0f,0x1c,0x18,0x18,0x18,0xf0}, /* ~ */{0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x8f,0xf1,0x60,0x00,0x00,0x00} }; static GLuint fontOffset1[10]; static GLuint fontOffset2[10]; static GLuint fontOffset3[10]; static GLuint fontOffset4[10]; static int mrf[10] = { 0,0,0,0,0,0,0,0,0,0 }; static char buffer[2000]; static float dcx = 0.0F; static float dcy = 0.0F; static float dcz = 0.0F; static int posval = 0; static float pixpos[4] = { 0,0,0,0 }; static void *font = GLUT_BITMAP_8_BY_13 ; static int alignement = LEFT; void placeFontCursor(float x,float y,float z) { glRasterPos4f(x,y,z,1.0F); GLboolean glb[10]; glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID,glb); posval = glb[0]; glGetFloatv(GL_CURRENT_RASTER_POSITION,pixpos); } void deplacementCursor(float x,float y,float z) { dcx = x; dcy = y; dcz = z; } void setFont(void *f,int a) { font = f; alignement = a; } void setAlignement(int a) { alignement = a; } void makeRasterFont(int w) { GLuint i; glPixelStorei(GL_UNPACK_ALIGNMENT,1); fontOffset1[w] = glGenLists(128); fontOffset2[w] = glGenLists(128); fontOffset3[w] = glGenLists(128); fontOffset4[w] = glGenLists(128); for ( i = 32 ; i < 126; i++ ) { glNewList(i+fontOffset1[w],GL_COMPILE); glBitmap(8,13,0.0,2.0,10.0,0.0,regular8x13[i-32]); glEndList(); } for ( i = 32 ; i < 126; i++ ) { glNewList(i+fontOffset2[w],GL_COMPILE); switch ( i ) { case 'i' : glBitmap(8,10,0.0,2.0,3.0,0.0,regular6x10[i-32]); break; case 'f' : glBitmap(8,10,0.0,2.0,4.0,0.0,regular6x10[i-32]); break; default : glBitmap(8,10,0.0,2.0,6.0,0.0,regular6x10[i-32]); break; } glEndList(); } for ( i = 32 ; i < 126; i++ ) { glNewList(i+fontOffset3[w],GL_COMPILE); glBitmap(8,13,0.0,2.0,10.0,0.0,symbol[i-32]); glEndList(); } for ( i = 32 ; i < 126; i++ ) { glNewList(i+fontOffset4[w],GL_COMPILE); glBitmap(8,13,0.0,2.0,8.0,0.0,dessin[i-32]); glEndList(); } } void affichageChaine(int depth,int fonte) { int ww = glutGetWindow(); if ( !mrf[ww] ) { mrf[ww] = 1 ; makeRasterFont(ww); } glPushMatrix(); glLoadIdentity(); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); int w = glutGet(GLUT_WINDOW_WIDTH); int h = glutGet(GLUT_WINDOW_HEIGHT); glOrtho(0,w,0,h,0.0,1.0); glMatrixMode(GL_MODELVIEW); float largeurCaractere = 10.0F; switch (fonte) { case 2 : largeurCaractere = 6.0F ; break; case 3 : largeurCaractere = 10.0F ; break; case 4 : largeurCaractere = 8.0F ; break; } switch (alignement) { case CENTER : { int len =(int) strlen(buffer); float dx = (len*largeurCaractere)/2; float dy = 6; glRasterPos4f(pixpos[0]-dx+dcx,pixpos[1]-dy-dcy,-pixpos[2]-dcz,pixpos[3]); } break; case RIGHT : { int len =(int) strlen(buffer); float dx = len*largeurCaractere; float dy = 6; glRasterPos4f(pixpos[0]-dx+dcx,pixpos[1]-dy-dcy,-pixpos[2]-dcz,pixpos[3]); } break; default : glRasterPos4f(pixpos[0]+dcx,pixpos[1]-dcy,-pixpos[2]-dcz,pixpos[3]); break; } dcx = dcy = dcz = 0.0F; glPushAttrib(GL_DEPTH_TEST); if ( depth ) glEnable(GL_DEPTH_TEST); else { glDisable(GL_DEPTH_TEST); } if ( posval ) { glPushAttrib(GL_LIST_BIT); glListBase(fontOffset1[ww]); switch (fonte) { case 2 : glListBase(fontOffset2[ww]); break; case 3 : glListBase(fontOffset3[ww]); break; case 4 : glListBase(fontOffset4[ww]); break; } glCallLists((GLsizei) strlen(buffer),GL_UNSIGNED_BYTE,(GLubyte *) buffer); glPopAttrib(); } glPopAttrib(); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); } void simpleBitmapOutput(int depth,int fonte,char *format,...) { va_list args; va_start(args,format); vsprintf(buffer,format,args); va_end(args); affichageChaine(depth,fonte); } void simpleBitmapOutput(int fonte,char *format,...) { va_list args; va_start(args,format); vsprintf(buffer,format,args); va_end(args); affichageChaine(0,fonte); } void simpleBitmapOutput(char *format,...) { va_list args; va_start(args,format); vsprintf(buffer,format,args); va_end(args); affichageChaine(1,1); } void bitmapOutput(void *font,char *format,...) { char *p; va_list args; va_start(args,format); vsprintf(buffer,format,args); va_end(args); glPushMatrix(); glLoadIdentity(); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); int w = glutGet(GLUT_WINDOW_WIDTH); int h = glutGet(GLUT_WINDOW_HEIGHT); glOrtho(0,w,0,h,0.0,1.0); glMatrixMode(GL_MODELVIEW); switch (alignement) { case CENTER : { int len =(int) strlen(buffer); float dx = (len*8)/2; float dy = 6; glRasterPos4f(pixpos[0]-dx+dcx,pixpos[1]-dy-dcy,-pixpos[2]-dcz,pixpos[3]); } break; case RIGHT : { int len =(int) strlen(buffer); float dx = len*8; float dy = 6; glRasterPos4f(pixpos[0]-dx+dcx,pixpos[1]-dy-dcy,-pixpos[2]-dcz,pixpos[3]); } break; default : glRasterPos4f(pixpos[0]+dcx,pixpos[1]-dcy,-pixpos[2]-dcz,pixpos[3]); break; } dcx = dcy = dcz = 0.0F; glPushAttrib(GL_DEPTH_TEST); glDisable(GL_DEPTH_TEST); if ( posval ) for ( p = buffer ; *p ; p++ ) glutBitmapCharacter(font,*p); glPopAttrib(); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); } void bitmapOutput(GLfloat x,GLfloat y,GLfloat z,void *font,char *format,...) { placeFontCursor(x,y,z); va_list args; va_start(args,format); bitmapOutput(font,format,args); va_end(args); } void bitmapStringOutput(char *format,...) { va_list args; va_start(args,format); bitmapOutput(font,format,args); va_end(args); } void bitmapStringOutput(GLfloat x,GLfloat y,GLfloat z,char *format,...) { placeFontCursor(x,y,z); va_list args; va_start(args,format); bitmapOutput(font,format,args); va_end(args); } void lineOutput(int xi,int yi,int xf,int yf) { glPushMatrix(); glLoadIdentity(); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); int w = glutGet(GLUT_WINDOW_WIDTH); int h = glutGet(GLUT_WINDOW_HEIGHT); glOrtho(0,w,0,h,0.0,1.0); glMatrixMode(GL_MODELVIEW); glPushAttrib(GL_DEPTH_TEST); glDisable(GL_DEPTH_TEST); if ( posval ) { glBegin(GL_LINES); glVertex4f(pixpos[0]+xi,pixpos[1]-yi,-pixpos[2],pixpos[3]); glVertex4f(pixpos[0]+xf,pixpos[1]-yf,-pixpos[2],pixpos[3]); glEnd(); } glPopAttrib(); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); } static int bold = 0; static int anti = 0; static float ecar = 0.0F; void setBold(int b) { bold = b; } void setAntialiased(int a) { anti = a; } void setEcartementCaracteres(float e) { ecar = e; } int getBold(void) { return(bold); } int getAntialiased(void) { return(anti); } float getEcartementCaracteres(void) { return(ecar); } void strokeOutput(GLfloat x,GLfloat y,float fact,char *format,...) { va_list args; char buffer[2000],*p; va_start(args,format); vsprintf(buffer,format,args); va_end(args); glPushMatrix(); glTranslatef(x,y,0); glScalef(0.005*fact,0.005*fact,0.005*fact); float w; glGetFloatv(GL_LINE_WIDTH,&w); GLboolean b; glGetBooleanv(GL_BLEND,&b); GLboolean ls; glGetBooleanv(GL_LINE_SMOOTH,&ls); if ( bold ) glLineWidth(2.0); else glLineWidth(1.0); if ( anti ) { glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_LINE_SMOOTH); } else { glDisable(GL_BLEND); glDisable(GL_LINE_SMOOTH); } for ( p = buffer ; *p ; p++ ) { glutStrokeCharacter(GLUT_STROKE_ROMAN,*p); glTranslatef(ecar,0.0F,0.0F); } if ( b ) glEnable(GL_BLEND); else glDisable(GL_BLEND); if ( ls ) glEnable(GL_LINE_SMOOTH); else glDisable(GL_LINE_SMOOTH); glLineWidth(w); glPopMatrix(); }