home *** CD-ROM | disk | FTP | other *** search
- #include "tk.h"
- #include "aux.h"
-
- static GLuint bitmapBaseInit = GL_TRUE;
- static GLuint bitmapBase = 0;
-
- void auxCreateFont(void)
- {
- if(!bitmapBaseInit) return;
- bitmapBaseInit = GL_FALSE;
-
- bitmapBase = glGenLists(256);
- if(tkCreateBitmapFont(bitmapBase) == GL_FALSE)
- {
- auxQuit();
- }
- }
-
- void auxDrawStr(char *str)
- {
- if(bitmapBaseInit) auxCreateFont();
-
- glPushAttrib(GL_LIST_BIT);
-
- glListBase(bitmapBase);
- glCallLists(strlen(str), GL_UNSIGNED_BYTE, (unsigned char *) str);
-
- glPopAttrib();
- }
-