Rotating Happy Birthday Message?! =)
Hey guys, OpenGL n00b here.
It's my mother's birthday, and I figured that I'd make her a small screensaver with a randomly rotating happy birthday message.
Now, I have some experience with OpenGL/GLUT; but no experience whatsoever with stroke/bitmap fonts.
If anyone can nudge me in the right direction with a tutorial/little bit of a source code I would be extremely grateful.
Cheers!
Ollie.
glutBitmapCharacter(font,char); //renders a character
ex, glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24,'H') renders H onto screen
here is a functions that renders string :
ex, glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24,'H') renders H onto screen
here is a functions that renders string :
void glutString(const char *str, float x, float y, float z){ glRastefPos3f(x,y,z); //set starting position of first letter int len = strlen(str); for(int i = 0; i < len ; i+) glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24,str) }
I think there's a tutorial for an OpenGL screensaver on nehe.gamedev.net. At least there's a few example programs with source for it, for example the last one on this page I found with Google: http://nehe.gamedev.net/data/downloads/download.asp?letter=M.
I don't know if any contains rotating text, but there are tutorials for that on NeHe also, on the following page: http://nehe.gamedev.net/lesson.asp?index=03.
I don't know if any contains rotating text, but there are tutorials for that on NeHe also, on the following page: http://nehe.gamedev.net/lesson.asp?index=03.
Not to dis your project, but you know there's already a randomly rotating text screen saver built into Windows right?
You could just enable that and enter "Happy birthday!" for the text to be displayed. :P If you tell her you made it, you're telling the truth in some sense.
You could just enable that and enter "Happy birthday!" for the text to be displayed. :P If you tell her you made it, you're telling the truth in some sense.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement