diff options
author | Matt Turner <mattst88@gmail.com> | 2008-03-01 18:04:19 +0000 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2008-03-01 18:04:19 +0000 |
commit | 8490c68f5d3fbb4d3e0030467dd785beca10c3f1 (patch) | |
tree | ca375e1605a94d44bf23d3b8e80084ec65371da2 /text.c | |
parent | 83723eb5558383537968bee22b2342372ad9a40d (diff) |
Begin adding text rendering support using QuesoGLC. Minor clean ups. Begin working on FPS counter.
git-svn-id: svn://mattst88.com/svn/glpong/trunk@13 449aeecc-241a-0410-943f-e2f883e2d7a2
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) { } |