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.
Drawing text skewed/crooked, etc
-
- Posts: 12
- Joined: Sat Jun 04, 2011 7:04 pm
Drawing text skewed/crooked, etc
Last edited by Some Moron on Mon Aug 27, 2012 7:31 pm, edited 2 times in total.
-
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Re: Drawing text skewed/crooked, etc
There's irr::scene::ITextSceneNode, maybe this is what you are looking for.
"Whoops..."
-
- Posts: 12
- Joined: Sat Jun 04, 2011 7:04 pm
Re: Drawing text skewed/crooked, etc
Didn't even realize that was there, but that sounds just about right... thanks!
-
- Posts: 12
- Joined: Sat Jun 04, 2011 7:04 pm
Re: Drawing text skewed/crooked, etc
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...
Re: Drawing text skewed/crooked, etc
Sure, just render your text to a texture and then display on a quad