-static void
-load_font (ModeInfo *mi, char *res, XFontStruct **fontP, GLuint *dlistP)
-{
- const char *font = get_string_resource (res, "Font");
- XFontStruct *f;
- Font id;
- int first, last;
-
- if (!font) font = "-*-times-bold-r-normal-*-140-*";
-
- f = XLoadQueryFont(mi->dpy, font);
- if (!f) f = XLoadQueryFont(mi->dpy, "fixed");
-
- id = f->fid;
- first = f->min_char_or_byte2;
- last = f->max_char_or_byte2;
-
- clear_gl_error ();
- *dlistP = glGenLists ((GLuint) last+1);
- check_gl_error ("glGenLists");
- glXUseXFont(id, first, last-first+1, *dlistP + first);
- check_gl_error ("glXUseXFont");
-
- *fontP = f;
-}
-
-static void
-draw_label (ModeInfo *mi, const char *s)
-{
- spheremonics_configuration *cc = &ccs[MI_SCREEN(mi)];
- int i;
-
- glPushAttrib(GL_TRANSFORM_BIT | GL_ENABLE_BIT);
- glDisable(GL_LIGHTING);
- glDisable(GL_DEPTH_TEST);
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
- gluOrtho2D(0, mi->xgwa.width, 0, mi->xgwa.height);
- glColor3f(1.0, 1.0, 0.0);
-
- glRasterPos2f (10,
- (mi->xgwa.height
- - 10
- - (cc->font->ascent + cc->font->descent)));
- for (i = 0; i < strlen(s); i++)
- glCallList (cc->font_list + (int)s[i]);
-
- glPopMatrix();
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glPopAttrib();
-}
-
-
-\f
-
-void