OgreFontHelper         Utils for rendering text if Ogre::TextAreaOverlayElement is not enough
Print

Ghoulsblade? 01:13, 2 July 2007 (BST) : a while ago i wrote some utils for rendering text as the textarea overlay was not sufficient for my needs.
maybe someone will find this useful :-)

what this might be useful for :

  • render text inside the 3d scene (flat, but with 3d coordinates)
  • calculating text bounds before/without creating an overlay element
  • autowrapping of text
  • mousepicking of text (what glyph/charindex is below the mouse, useful for text input)
  • getting the bounding box of a glyph/charindex inside a textbox, e.g. for highlighting text/selection

 
here's a forum thread about it :

 
here is the code :

 
usage examples :

 


Contributors to this page: jacmoe111451 points  and OgreWikiBot .
Page last modified on Saturday 02 of January, 2010 21:01:30 GMT by jacmoe111451 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.