diff options
Diffstat (limited to 'text.c')
-rw-r--r-- | text.c | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -0,0 +1,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) { } |