Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

thedavil

Is ID3DXFont faster than CD3DFont with the DX update?

This topic is 5375 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

The Subject says it all. Has anyone tested it yet to any extent? -Dave Mandrella thedavil@hotmail.com [edited by - thedavil on September 25, 2003 4:35:21 PM]

Share this post


Link to post
Share on other sites
Advertisement
I haven''t tested it yet. But in the previos version, CD3DFont is a LOT faster than ID3DXFont. ID3DXFont, I think, uses mathematical calculations to render the fonts. CD3DFont on the other hand, uses textured quad. And textured quad is definitely faster.

Share this post


Link to post
Share on other sites
Yeah, that is how it used to work, but with the DX Summer Update they changed it to work more like CD3DFont and totally took GDI out of the picture, so there was supposed to be a huge speed boost. I just wanted to know if it was possible to use ID3DXFont to render text faster than CD3DFont now that GDI is not being used. Basically a frame-rate to frame-rate ratio under different render options would be nice, but I''d just settle for a general comparison for plain text.

-Dave Mandrella
thedavil@hotmail.com

Share this post


Link to post
Share on other sites
I have exactly the same speed with the new ID3DXFont(summer sdk update) than my own bitmap font class.

BUT, i haven''t optimized ALOT my own bitmap class...

The thing is that ID3DXFont is really fun to play with and alot less problems...

it was time for ms to do this...

Share this post


Link to post
Share on other sites
I was very interested in this myself - there are some areas where I''m currently relying on CD3DFont.

I was able to do a quick implementation in my existing app using ID3DXFont - my results seem in line with Drunken Hyena''s comments. I basically threw d3dxfont and cd3dfont calls on top of my existing rendering (as if showing debug status/etc). I used 9 calls to DrawText, each call rendering about 70 characters.

While less than scientific, my results were:

* No font rendering = 166fps
* CD3DFont = 127fps
* ID3DXFont = 112fps

Using no other rendering (just clearing the screen each frame):

* No font rendering = 333fps
* CD3DFont = 205fps
* ID3DXFont = 170fps

Hopefully Pedro will do a more intensive test . This test was pretty simple and lacked variety.

Share this post


Link to post
Share on other sites
Was that test using the summer update? It''s been greatly improved.

The biggest boost you could get is using the D3DXSprite. It has to create a D3DXSprite object every call if you don''t. Also, Sprite will cache the calls and sort things by texture if you create it that way (drawing actually happens in Flush() or End()) so using the Sprite is a big improvement, especially if you have several font objects running through the same sprite.

Incidentally, it still uses GDI, but only to create the font bitmap, so only when you create it.

I like pie.

Share this post


Link to post
Share on other sites
I have a kinda of dumb question, what is the summer update?? If I knew what i was i could help you, but currently my computer never fully installs DX v9.0(a or b i have tried them both) It keeps stalling up when it is copying the file "qasf.dll". I know this should belong in another topic but just wanted to slide it in(hehe).

A REAL question: What else is in the summer update? Is there a new HLSL tutorial? (I would go to microsoft.com but when they designed Windows, they forgot to add a USER-friendly site as well)

This confused person is gonna hit you where it hurts, you programmer (THE HANDS!!!)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!