diff utils.c @ 4:035d3880da04

render text with number of elements on screen
author Dennis C. M. <dennis@denniscm.com>
date Mon, 12 Jun 2023 23:10:08 +0100
parents
children 6be2faa7ed6e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utils.c	Mon Jun 12 23:10:08 2023 +0100
@@ -0,0 +1,10 @@
+#include "utils.h"
+
+
+void render_text(const char *text, float x, float y) {
+	glRasterPos2f(x, y);
+
+	for (const char *c = text; *c; ++c) {
+		glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24, *c);
+	}
+}