Sign in to follow this  

D3DXFont (dx8) - slow?

This topic is 3112 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on my ORPG game with dx8, everything went nice until I had to draw like 12 text fields at once - FPS dropped from ~1900 to ~430. I've looked around these forums and heard that dx8 version D3DXFont is incredibly slow BUT...is there a chance to avoid that big drop of FPS? I'm loading my font on initializing then I simply call function to draw text in rendering part, so that part should be ok how everything is handeled (or maybe not?). Big problem for me is, that I'll want to draw like 30 player names at once, and if that drop is so big, game will start to run slow for sure. Suggestions? (except to switch on dx9? :P)

Share this post


Link to post
Share on other sites
Quote:
Original post by Blodyavenger
I'm working on my ORPG game with dx8, everything went nice until I had to draw like 12 text fields at once - FPS dropped from ~1900 to ~430.

I've looked around these forums and heard that dx8 version D3DXFont is incredibly slow BUT...is there a chance to avoid that big drop of FPS?

I'm loading my font on initializing then I simply call function to draw text in rendering part, so that part should be ok how everything is handeled (or maybe not?).

Big problem for me is, that I'll want to draw like 30 player names at once, and if that drop is so big, game will start to run slow for sure.

Suggestions? (except to switch on dx9? :P)


The DX9 version is as slow as the DX8 from what i know. I suggest you to use bitmap fonts otherwise like me prerenderize with GDI/GDI+ the text and cache it. Try to see these posts i've made on my blog to see how i've organized the things :

http://feal87.wordpress.com/2009/05/31/scrapping-out-the-id3dx10sprite-id3dxsprite-interface/

http://feal87.wordpress.com/2009/06/01/remake-of-id3dx10font-id3dxfont/

You should be able to get a good increase in speed this way. (you should get the MAXIMUM possible speed EVER if your text isn't changing this way)

P.S. Remember that FPS is not linear. 1900 fps are 0.52 ms a frame, 430 fps are 2.32 ms a frame.

Share this post


Link to post
Share on other sites

This topic is 3112 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this