Jump to content
  • Advertisement
Sign in to follow this  
ChristianPena

[D3D] - Showing text as textured quads

This topic is 4636 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

Hi, I haven't yet delved into doing text on screen besides using the Font class provided by DirectX, but I am planning to use textured quads to represent my text on screen. My question is this: I am creating a console. Should I have a quad for every character in every line of the console or should I have a quad for every character on 1 line and re-texture (for each letter), offset (translate), and draw that one set of quads over and over again for each line of the console? Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
It's not really an answer to your question, but you might want to look into the Sprite class (for Managed DirectX, I believe the C++ equivalent is D3DXSPRITE). This will take care of all the font rendering details behind the scenes, so you don't have to.

Basically you create a Font for it and use the DrawText (or something close) method on the sprite to render a string in your selected font, without all the hassle. Check out the DirectX SDK's samples, they all should use Sprites to draw the frame statistics, help and other texts.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!