blob: cd90efeccd9532a7a4222c4902ea6bc845dfbbc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#include <GL/glc.h>
#include "text.h"
static GLuint font;
int
GLPong_TextInit() {
GLuint context = glcGenContext();
glcContext(context);
if (!glcIsContext(context)) {
return -1;
}
#ifdef DEBUG
count = glcGeti(GLC_CATALOG_COUNT);
for (i = 0; i < count; i++) {
printf("%s\n", (char *)glcGetListc(GLC_CATALOG_LIST, i));
}
#endif
font = glcGenFontID();
glcNewFontFromFamily(font, "Ar");
glcFontFace(font, "Normal");
glcRenderStyle(GLC_TEXTURE);
glcFont(font);
return 0;
}
void
GLPong_TextDeinit() {
glcDeleteFont(font);
}
void
GLPong_TextDrawFPS(GLfloat fps) { }
|