ID3DXSprite slow?

Started by
2 comments, last by Abob 21 years, 2 months ago
Is it true that ID3DXSprite is slow? (DirectX 8.1) I thought that D3DX was very well optimized. But I read in another post that ID3DXSprite is not as fast as it could be. Maybe I will have to write my own Sprite class and see if I can beat it. Anybody know how well optimized ID3DXSprite is? Or have another Sprite class I could test it against? Thanks for any help
Arrg!!
Advertisement
You can write your own, its not a big deal. Textured quads.
quote:Anybody know how well optimized ID3DXSprite is?

I think it uses an internal dynamic buffer for rendering, or something similar. I mean a buffer where all sprites are appended to be rendered in a big DrawPrim call.

Did you test ID3DXSprite? Modern cards should be able to kick hundres of thousands of sprites to the screen with no trouble. What''s the frame rate you got?

In my case the ID3DXSprite is faster than the Blit i wrote myself (maybe i wrote a special bad one, but i dont think so), when drawing 1400 tiles on the screen i got a speed increase of 40 fps by using ID3DXSprite.

So I beleive that ID3DXSprite buffer up it''s sprites as Coder says, to improve the speed.

Just make sure you only call Begin(), End() once every frame and not for each call to ID3DXSprite->Draw(), because Begin() End() restores ALL the renderstates, and you can easily gain huge advantage by restoring only those renderstates you have changed.

This topic is closed to new replies.

Advertisement