comparison 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
comparison
equal deleted inserted replaced
3:e4003f606e07 4:035d3880da04
1 #include "utils.h"
2
3
4 void render_text(const char *text, float x, float y) {
5 glRasterPos2f(x, y);
6
7 for (const char *c = text; *c; ++c) {
8 glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24, *c);
9 }
10 }