Jump to content
  • Advertisement
Sign in to follow this  
Rob Loach

SDL Text Output

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

Advertisement
agreed. SDL_TTF is a blast to use. But you have to do it in chunks, you can't just render it one letter at a time. Well, you can, but it's best to get as much use out of that one surface pointer as you can.

Share this post


Link to post
Share on other sites
SDL_TTF without a doubt. It smacked me good tho in the beginning - dragged my framerates into the single digits when I first started using it. Then I realized through profiling, as PnP Bios said, that all my time was being used up rendering the text every single frame. So make sure you always render the text once to an intermediate surface, and then just keep blitting that surface to the main surface and only re-render the text when it changes.

NOt saying you guys don't do that, just saying it for anyone coming here, checking out SDL_TTF, and making the same mistake as me [smile]

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!