ID3DXFont too slow

Started by
4 comments, last by DrunkenHyena 19 years ago
Hi I've been using ID3DXFont interface to draw some 2d text, but i'm getting a huge slowdown. I'm writing a console, and with 28 lines of text, the frame rate drops from 285 to 35. From past experiences, i kenw that ID3DXFont was slow, but not this much. With vtune i confirmed that ID3DXFont was the cause of this. Calling ID3DXFont.Begin() and ID3DXFont.End() before and after rendering all the lines of text helped a little. Is there any tip to improve the writing of 2d text, not considering rendering fonts from a image file? Or is 28 lines just too much?
Advertisement
Which SDK are you using? It was improved quite a bit in the latest release.
____________________________________________________________AAAAA: American Association Against Adobe AcrobatYou know you hate PDFs...
SDK DX 8.1
Something I noticed... the intellisense of the Draw function of the font class, suggests that when your calling the function for the same text a lot, you should use a sprite, as passing in a string causes the function to have to render the text each time.
well but in this case isnt always the same text
anyway, thanks
The D3DXFont that ships with the DX8 SDK is very slow, don't use it. In the Common directory in the SDK install you can find CD3DFont. It's not quite as flexible as D3DXFont but it is a LOT faster.
Stay Casual,KenDrunken Hyena

This topic is closed to new replies.

Advertisement