Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

trager

Improve my text life... please

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

wouldn''t it be nice if there was a function which let you put text onto a designated bitmap, in a speicified place and using a specified colour? some like: text(bitmap_ptr,x,y,r,g,b,"arrrrrrrrrrrrgh"); I mean that would be lovely wouldn''t it? I may even get some sleep by the end of the month if someone can point me toward something like this. Please. Yes I have read, used and modified Lessons 13,14,15 and 43 just that I feel I am reeventing the wheel so if you know and good text functions could you please point me to them. With thanks trager

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
if you use openGL with SDL you can use SDL_ttf.

http://www.libsdl.org/projects/SDL_ttf/

Share this post


Link to post
Share on other sites
Just had a quick look and it doesnt appear that it renders text to bitmaps, can you confirm this please.

Thanks

Trager

Share this post


Link to post
Share on other sites
It renders to SDL surfaces. They''re bitmaps, and SDL can convert them to pretty much whatever format you might want them in--look at the docs.

If you wanted to use this in GL, what you could do is create the SDL surface, clear it, render the text to it, then upload the surface to the GL the normal way.

Rendering truetype is NOT FAST though, so this probably isn''t what you want to do if you want text changing every frame.

Share this post


Link to post
Share on other sites
Sounds interesting Lancekt I''ll look into it, as it happens I don''t need to update the text every frame.

thanks

trager

Share this post


Link to post
Share on other sites

  • 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!