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.


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.

| improve this answer | |
  • \$\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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.