Sign in to follow this  
ChristianPena

[D3D] - Showing text as textured quads

Recommended Posts

ChristianPena    169
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
remigius    1172
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this