Archived

This topic is now archived and is closed to further replies.

nanobyte

Text Directx 8

Recommended Posts

Look for some other posts about this...

You could use gdi, BUT YOU DON''T WANT TO!!!!

look through the SDK samples that use fonts. Essentially, they use gdi ONCE to draw an alphabet to a texture and then they use that texture to render sets of textured quads. You can either use their font class, or derive your own.

Share this post


Link to post
Share on other sites
Look in the samples for the CD3DFont class. It does 2D or 3D text. There is one example called "3D Text" that show how to use it.

Share this post


Link to post
Share on other sites
there is a font class in D3DX thats given with the sdk..

its quite easy to use.

D3DXFONT class ..



{ Stating the obvious never helped any situation !! }

Share this post


Link to post
Share on other sites
D3DXFONT is just a wrapper for some GDI functions so it''s not a way to follow the "Don''t use the GDI method!" advice. But, if you''re just looking at a way to display some temporary debug text (that doesn''t need speed), you could use D3DXFONT just to avoid to play with device contexts.

For in-game text, you should use a texture that hold the alphabet as CrazedGenius said. Simpler : draw the complete alphabet on a bitmap to completely avoid GDI !

Share this post


Link to post
Share on other sites