What should I do if my text exceeds my text render target boundaries?

Posted by user1423893 on Game Development See other posts from Game Development or by user1423893
Published on 2012-07-06T12:38:50Z Indexed on 2012/07/06 21:26 UTC
Read the original article Hit count: 216

Filed under:
|

I have a method for drawing strings in 3D that does the following:

  • Set a render target
  • Draw each character as a quadrangle using a orthographic projection to the render target
  • Unset the render target
  • Draw the render target texture using a perspective projection and a world transform

My problem is how to deal with strings whose characters length exceeds that of the render target dimensions? For example if I have string "This is a reallllllllllly long string" and the render target can't accommodate it, it will only capture "This is a realllll".

The render target (and its size) could be set each frame but wouldn't that be far too costly?

© Game Development or respective owner

Related posts about XNA

Related posts about rendertargets