[D3D] - Showing text as textured quads
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement