Drawing text skewed/crooked, etc

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
Some Moron
Posts: 12
Joined: Sat Jun 04, 2011 7:04 pm

Drawing text skewed/crooked, etc

Post by Some Moron »

I've found Irr's text drawing functions simple enough - create a font, call draw() with a string, and the requested text appears on the screen. This works fine for basic GUIs, but I'm wondering if it's possible to skew/rotate drawn text, or better yet, draw the text temporarily onto a model so it can be used for a 3D menu buttons or HUD counters.

Is there an easy way to do this? It seems like a job for Render-To-Texture, but I'm not entirely clear on how to accomplish it.
Last edited by Some Moron on Mon Aug 27, 2012 7:31 pm, edited 2 times in total.
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Re: Drawing text skewed/crooked, etc

Post by randomMesh »

There's irr::scene::ITextSceneNode, maybe this is what you are looking for.
"Whoops..."
Some Moron
Posts: 12
Joined: Sat Jun 04, 2011 7:04 pm

Re: Drawing text skewed/crooked, etc

Post by Some Moron »

Didn't even realize that was there, but that sounds just about right... thanks!
Some Moron
Posts: 12
Joined: Sat Jun 04, 2011 7:04 pm

Re: Drawing text skewed/crooked, etc

Post by Some Moron »

Hmm. Finally got around to messing with this feature (had to get around a computer issue first), but it doesn't seem to work as I'd hoped. From what I can see, ITextSceneNode displays text into static 2D space (just like drawing text in a GUI) but at whatever point on the screen matches the equivalent 3D position. This could be useful in its own way, but what I'm trying to figure out is if it's possible to render text into a 3D scene into a quad or billboard, so it can be freely rotated or viewed from different angles...
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Drawing text skewed/crooked, etc

Post by hendu »

Sure, just render your text to a texture and then display on a quad ;)
Post Reply