Improve my text life... please
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
Just had a quick look and it doesnt appear that it renders text to bitmaps, can you confirm this please.
Thanks
Trager
Thanks
Trager
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement