view 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 source

#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);
	}
}