Jump to content
  • Advertisement
Sign in to follow this  
mpledge52

OpenGL Text in openGL

This topic is 3975 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

I've created a heightmap in openGL, the next step I want to do is put in place names, i.e. label the different countries/cities. How would I go about putting text in my window? I've had a quick look in the redbook and the only mention of fonts is very low-level, actually creating a letter out of a group of bitmap pixels. Is there any easier way to do it than this? I would like something a bit more advanced so I can easily scale and rotate them? Thanks for any help.

Share this post


Link to post
Share on other sites
Advertisement
Not mentioned in the list:

I like to use SDL_TTF. It's cross platform, and allows for texture mapping the text straight to a quad, easy to scale/rotate/move, etc.

It also doesn't require GLUT, which was the big decision maker for me.

Share this post


Link to post
Share on other sites
Thanks everyone. I've decided to use GLUT bitmap characters as I'm using GLUT anyway, and they're so simple to use and do exactly what I require. One question though - is there anyway you can change the font used or are you strictly limited to the following:

GLUT_BITMAP_8_BY_13
GLUT_BITMAP_9_BY_15
GLUT_BITMAP_TIMES_ROMAN_10
GLUT_BITMAP_TIMES_ROMAN_24
GLUT_BITMAP_HELVETICA_10
GLUT_BITMAP_HELVETICA_12
GLUT_BITMAP_HELVETICA_18

It's not a major problem but I would like to use a font that is slightly 'fatter', or just use one of the above fonts in bold. Is there anyway to do this?

Thanks.

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!