home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 2000 April & May / AMIGA_2000_04.iso / patches / mesa3.1 / mesa-aux.lha / src-aux.aos / font.c < prev    next >
Encoding:
C/C++ Source or Header  |  1999-06-20  |  415 b   |  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.