summaryrefslogtreecommitdiff
path: root/text.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2008-03-01 18:04:19 +0000
committerMatt Turner <mattst88@gmail.com>2008-03-01 18:04:19 +0000
commit8490c68f5d3fbb4d3e0030467dd785beca10c3f1 (patch)
treeca375e1605a94d44bf23d3b8e80084ec65371da2 /text.c
parent83723eb5558383537968bee22b2342372ad9a40d (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.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/text.c b/text.c
new file mode 100644
index 0000000..cd90efe
--- /dev/null
+++ b/text.c
@@ -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) { }