Jump to content
  • Advertisement
Sign in to follow this  
ollyb342

OpenGL Rotating Happy Birthday Message?! =)

This topic is 3424 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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)

}

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!