0
\$\begingroup\$

How can I draw text to the screen in directx 11 with slimdx? In SlimDX.Direct3D10 there's a font class which can be used but there's no font class in SlimDX.Direct3D11.

\$\endgroup\$
1
\$\begingroup\$

The easiest way is to use a bitmap font. You create a table that maps each ASCII (or UTF) character code to a region of a texture that contains all the characters you want to use. To draw a string, you create a vertex buffer with positions and textures, adding on a quad for each character, where the quad's size and UV coordinates are taken from the table.

This page is a bit of a read, but it's quite an in-depth tutorial on bitmap fonts.

\$\endgroup\$
1
  • \$\begingroup\$ Is this the only way? Seems much more complicated than the previous DirectX versions, why did they remove them? \$\endgroup\$
    – Levi H
    Jul 5 '13 at 20:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .