How do you draw text in DirectX 11?

后端 未结 4 2121
日久生厌
日久生厌 2020-12-14 09:58

In DirectX 10 you could use the font interface provided by D3DX10. In DirectX 11 you are supposed to use DirectWrite. But it looks like DirectWrite doesn\'t speak natively t

4条回答
  •  温柔的废话
    2020-12-14 10:04

    I recently converted a DirectX 10 application over to DirectX 11 and came across this post while searching for the same answer. The Rastertek tutorial mentioned by Zeela is good, but I continued searching and found FW1FontWrapper. After only about 30 minutes, I just finished integrating it into my project and it appears to be working great. The download section provides both x86 and x64 packages including header, library, and DLL. I am just doing a simple text output, so I can't say a lot about the API, except that for what I did (outputting frames per second), it only took about 5 lines of code (including creating/releasing the wrapper object). Based on his samples it seems to provide a lot more options than what I'm using so far.

提交回复
热议问题