home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / System / Mesa-3.1 / Mesa-aux / src-aux.aos / font.c < prev    next >
C/C++ Source or Header  |  1999-06-20  |  415b  |  27 lines

  1. /*
  2.  * font.c 
  3.  */
  4.  
  5. #include <string.h>
  6. #include <GL/gltk.h>
  7. #include <GL/glaux.h>
  8.  
  9. static GLuint bitmapBase;
  10.  
  11. void auxCreateFont(void)
  12. {
  13.   bitmapBase = glGenLists(256);
  14.   if (tkCreateBitmapFont(bitmapBase) == GL_FALSE) {
  15.     auxQuit();
  16.   }
  17. }
  18.  
  19. void auxDrawStr(char *str)
  20. {
  21.  
  22.   glPushAttrib(GL_LIST_BIT);
  23.   glListBase(bitmapBase);
  24.   glCallLists(strlen(str), GL_UNSIGNED_BYTE, (unsigned char *)str);
  25.   glPopAttrib();
  26. }
  27.