2 /* Copyright (c) Mark J. Kilgard, 1994. */
4 /* This program is freely distributable without licensing fees
5 and is provided without guarantee or warrantee expressed or
6 implied. This program is -not- in the public domain. */
10 #else /* for xscreensaver */
15 # include <OpenGL/gl.h>
20 # define APIENTRY /**/
23 #include "glutstroke.h"
26 glutStrokeCharacter(GLUTstrokeFont font, int c)
28 const StrokeCharRec *ch;
29 const StrokeRec *stroke;
30 const CoordRec *coord;
31 StrokeFontPtr fontinfo;
36 fontinfo = (StrokeFontPtr) __glutFont(font);
38 fontinfo = (StrokeFontPtr) font;
41 if (c < 0 || c >= fontinfo->num_chars)
43 ch = &(fontinfo->ch[c]);
45 for (i = ch->num_strokes, stroke = ch->stroke;
46 i > 0; i--, stroke++) {
47 glBegin(GL_LINE_STRIP);
48 for (j = stroke->num_coords, coord = stroke->coord;
49 j > 0; j--, coord++) {
50 glVertex2f(coord->x, coord->y);
54 glTranslatef(ch->right, 0.0, 0.0);