Jump to content
  • Advertisement
Sign in to follow this  
Paulpetk123

Best way to draw text on D3D11 application?

This topic is 1075 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, I need to know best way to draw text on D3D11 application. I tried to be smart and use easier way of rendering text on screen, by that i'm meaning TextOut and DrawText, which both failed, I used dozens of new examples of RenderText() and TextOut(), everyone of them failed. So what's the best way to draw text?

Edited by Paulpetk123

Share this post


Link to post
Share on other sites
Advertisement
The simplest way I found was to implement something called a spritefont which is a sprite sheet with the ascii sequence on it.

See one of my old journals for source code and descriptions:

http://www.gamedev.net/blog/1059/entry-2260816-making-my-own-spritefont-implementation/

There are some problems. It is harder to localise your text later and each font has to be pre-captured to an image file, but apart from that I found this to be trivially simple.

Let me know if this helps at all!

Share this post


Link to post
Share on other sites
I use AngelCode's wonderful BMFont free application to generate a texture from a font (http://www.angelcode.com/products/bmfont/). It's easy to use, the output format is very simple and easy to implement (just be careful with packing in structures or it's gonna be a pain in your butt) and its documentation is short and simple. Although it's simple, it still supports kerning pairs and character padding.

Share this post


Link to post
Share on other sites

The simplest way I found was to implement something called a spritefont which is a sprite sheet with the ascii sequence on it.

See one of my old journals for source code and descriptions:

http://www.gamedev.net/blog/1059/entry-2260816-making-my-own-spritefont-implementation/

There are some problems. It is harder to localise your text later and each font has to be pre-captured to an image file, but apart from that I found this to be trivially simple.

Let me know if this helps at all!

Wow, thanks, i'll try and implement it to my engine! ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!