Mercurial > public > algo-animator
view utils.c @ 5:6be2faa7ed6e
rectangles with variable height
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Tue, 13 Jun 2023 17:23:52 +0100 |
parents | 035d3880da04 |
children | 40a8bdbe2005 |
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); } } int random_int(int min, int max) { return rand() % ((max - min) + 1) + min; }