Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/post/src/glaux/font.c
3203 views
1
/* font.c */
2
3
4
#include <string.h>
5
#include "../tk/tk.h"
6
#include "glaux.h"
7
8
9
static GLuint bitmapBase;
10
11
12
void auxCreateFont(void)
13
{
14
bitmapBase = glGenLists(256);
15
if (tkCreateBitmapFont(bitmapBase) == GL_FALSE) {
16
auxQuit();
17
}
18
}
19
20
void auxDrawStr(char *str)
21
{
22
23
glPushAttrib(GL_LIST_BIT);
24
glListBase(bitmapBase);
25
glCallLists(strlen(str), GL_UNSIGNED_BYTE, (unsigned char *)str);
26
glPopAttrib();
27
}
28
29