How fast is SDL_ttf? I was going through writing a HUD for my game, and
to display various information, can I just sprintf() the info into a
char array and use SDL_ttf to render that char array every loop or
should I take the time and cache surfaces that haven’t changed?
if you look for dynamic strings, SDL_ttf is not the way to go, because it
creates a Surface for each invoke you do. Try a lib like BFont. To use ttf’s
for it, you can check out my utility at: http://www.2dgame-tutorial.com/sdl/fontbuilder/index.htm
It uses SDL_ttf to create the BFont compatible font-images.
Good luck!
Patrick.> ----- Original Message -----
From: chris@luethy.net (Christopher Thielen)
To:
Sent: Friday, April 18, 2003 11:56 AM
Subject: [SDL] SDL_ttf speed question
How fast is SDL_ttf? I was going through writing a HUD for my game, and
to display various information, can I just sprintf() the info into a
char array and use SDL_ttf to render that char array every loop or
should I take the time and cache surfaces that haven’t changed?
if you look for dynamic strings, SDL_ttf is not the way to go, because it
creates a Surface for each invoke you do. Try a lib like BFont. To use ttf’s
for it, you can check out my utility at: http://www.2dgame-tutorial.com/sdl/fontbuilder/index.htm
It uses SDL_ttf to create the BFont compatible font-images.