Jump to content
  • Advertisement
Sign in to follow this  
TutenStain

OpenGL Displaying text with OpenGL and SDL

This topic is 3617 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 have yet another question for you guys :) How do I display text using OpenGL and SDL? I have tried Nehes tutorials and it worked but it is using the windows API for creating a window which I don't want. I have tried to change it to SDL but then it wont display anything. Any good tutorials or link how to display text? Thanks again.

Share this post


Link to post
Share on other sites
Advertisement
If you don't want/have to use TrueTypeFont-files, you could always use Texture Mapped Fonts like in Nehe's Lesson 17. With texture mapped fonts, you don't need Windows to create a font. Basically, you have 1 texture-file (something like this) containing all the letters you want to draw. Then you can print a letter by just drawing a quad with the texture coordinates of that letter in the texture. This way, you can easily anti-alias texts, make it glow etc. by just changing the texture, and you can use any symbols you want by just drawing them in the texture.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!