Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
Is this the only way? Seems much more complicated than the previous DirectX versions, why did they remove them? –  jacker Jul 5 '13 at 20:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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