From http://www.jwz.org/xscreensaver/xscreensaver-5.30.tar.gz
[xscreensaver] / hacks / glx / glxfonts.h
1 /* glxfonts, Copyright (c) 2001-2014 Jamie Zawinski <jwz@jwz.org>
2  * Loads X11 fonts for use with OpenGL.
3  *
4  * Permission to use, copy, modify, distribute, and sell this software and its
5  * documentation for any purpose is hereby granted without fee, provided that
6  * the above copyright notice appear in all copies and that both that
7  * copyright notice and this permission notice appear in supporting
8  * documentation.  No representations are made about the suitability of this
9  * software for any purpose.  It is provided "as is" without express or 
10  * implied warranty.
11  *
12  * Loads X11 fonts for use with OpenGL.
13  */
14
15 #ifndef __GLXFONTS_H__
16 #define __GLXFONTS_H__
17
18 #include "texfont.h"
19
20 /* Draws the string on the window at the given pixel position.
21    Newlines and tab stops are honored.
22    Any numbers inside [] will be rendered as a subscript.
23    Assumes the font has been loaded as with load_texture_font().
24
25    If width and height are 0, then instead the text is placed
26    into the 3D scene at the origin, billboarded to face the
27    viewer.
28  */
29 void print_gl_string (Display *dpy,
30                       texture_font_data *font,
31                       int window_width, int window_height,
32                       GLfloat x, GLfloat y,
33                       const char *string,
34                       Bool clear_background_p);
35
36 #endif /* __GLXFONTS_H__ */