Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualsednihp

Posted 21 June 2012 - 12:01 PM

For all my text in SDL I use SDL_ttf and ttf fonts (fontspace.com is a great website for these). Load the font (TTF_OpenFont), then load the text to a SDL_Surface (I use TTF_RenderText_Blended for quality, there are others that are quicker with lower quality), then blit the surface to screen. All of this is done in my ImageCache class, which is probably similar to what you're trying to achieve.

This doesn't give me any noticeable slowdown at all and I redraw the entire screen every frame (same as you), but then all of my games are capped at 60fps.

#1sednihp

Posted 21 June 2012 - 12:00 PM

For all my text in SDL I use SDL_ttf and ttf fonts. Load the font (TTF_OpenFont), then load the text to a SDL_Surface (I use TTF_RenderText_Blended for quality, there are others that are quicker with lower quality), then blit the surface to screen. All of this is done in my ImageCache class, which is probably similar to what you're trying to achieve.

This doesn't give me any noticeable slowdown at all and I redraw the entire screen every frame (same as you), but then all of my games are capped at 60fps.

PARTNERS