Structural deformable models
Functions | Variables
glfont.h File Reference
#include <GL/gl.h>
Include dependency graph for glfont.h:

Go to the source code of this file.

Functions

void makeRasterFont (void)
 
void printString (char *s)
 

Variables

static GLubyte rasters [][13]
 
static GLuint fontOffset = 0
 

Function Documentation

void makeRasterFont ( void  )
inline

Definition at line 106 of file glfont.h.

References fontOffset, and rasters.

Referenced by printString().

107 {
108      GLuint i;
109      glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
110      fontOffset = glGenLists (128);
111      for (i = 32; i < 127; i++) {
112          glNewList(i+fontOffset, GL_COMPILE);
113              glBitmap(8, 13, 0.0, 2.0, 10.0, 0.0, rasters[i-32]);
114          glEndList();
115      }
116 }
static GLuint fontOffset
Definition: glfont.h:104
static GLubyte rasters[][13]
Definition: glfont.h:6
void printString ( char *  s)
inline

Definition at line 118 of file glfont.h.

References fontOffset, and makeRasterFont().

119 {
120      if(!fontOffset) makeRasterFont();
121      glPushAttrib (GL_LIST_BIT);
122      glListBase(fontOffset);
123      glCallLists(strlen(s), GL_UNSIGNED_BYTE, (GLubyte *) s);
124      glPopAttrib ();
125 }
static GLuint fontOffset
Definition: glfont.h:104
void makeRasterFont(void)
Definition: glfont.h:106

Variable Documentation

GLuint fontOffset = 0
static

Definition at line 104 of file glfont.h.

Referenced by makeRasterFont(), and printString().

GLubyte rasters[][13]
static

Definition at line 6 of file glfont.h.

Referenced by makeRasterFont().