Rotating Happy Birthday Message?! =)

Started by
3 comments, last by ollyb342 14 years, 9 months ago
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.
Advertisement
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 :

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) }
Our whole life is a opengl application.
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.
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.
Hey guys, sorry for the late reply (router went pop)

I really appreciate all of the suggestions thanks, I just got her a card in the end though (no internets =/ )

And bzroom; shame on you!! The idea was to make something from scratch =0

lol cheers guys.

Ollie.

This topic is closed to new replies.

Advertisement