Skip to main content
gamedev.net
🔒 Locked

Text render with GLUT

Started by elektronjunge 1 reply 900+ views
Original Post
elektronjunge
elektronjunge
I am unable to render text in my GLUT based openGL program with out weird arrays of bits. There has got to be an easier way to this. Can anyone help?
MARS_999
MARS_999
What do you mean by weird array of bits? I use text rendering from glut and is easy...

void renderBitmapString(
float x,
float y,
float z,
void *font,
char *string) {
char *c;
glRasterPos3f(x, y,z);
for (c=string; *c != '\0'; c++) {
glutBitmapCharacter(font, *c);
}
}

is pretty easy...
elektronjunge
elektronjunge
Exactly all of the examples I was able to find contained an array of 40+ bits. Which I decided could not possibly be right. Thanks for the help.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.