Write Text to IImage

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Twaek
Posts: 5
Joined: Fri Sep 20, 2013 1:17 am

Write Text to IImage

Post by Twaek »

So, I have this little issue where I need to, as the title says, write a string to an IImage, but I can't seem to find a method for doing that. Is there a way, or if not, are there any pointers to write such a method?
CuteAlien
Admin
Posts: 10024
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Write Text to IImage

Post by CuteAlien »

You can use textures as rendertarget (IVideoDriver::setRenderTarget). And then convert the texture to an IImage (IVideoDriver::createImage). I don't think there is a solution aside from that in Irrlicht.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Write Text to IImage

Post by hendu »

If you need a software-only solution, use SDL and SDL_ttf for example.
Post Reply