Sprites vs Quads

Started by
3 comments, last by Tertsi 19 years, 5 months ago
Just a quick question. I know it's been discussed in other threads but I haven't found a difinitive answer yet. So, does anyone know whether which is faster/more efficient : sprites or quads? At the moment I'm rendering my (9 pass) scene using screen-aligned quads, but I'm drawing my HUD with sprites (2d screen space, not object space). I would like to know which is fastest so that I'm not slowing my program down unnecessarily. If their about the same then I guess I can continue to do what I am doing. Thanks in advance.
Advertisement
if you're using DirectX you should stick to the ID3DXSprite interface 'cause that's pretty good and it'll require alot of coding to get a system that's capable of compete with that interface.

don't do the same mistake that everybody else's doing: do NOT create a ID3DXSprite interface for each of your sprite 'cause the interface is a batcher that'll batch you ID3DXSprite->(...) functions into one call (or something like that.. hasn't worked with the ID3DXSprite long enough)
Ethereal
Under the hood, D3DXSprite is just a (very intelligent) quad renderer.
Stay Casual,KenDrunken Hyena
Don't worry, I've only got one Sprite instance that I apply various textures to. But I've also got my own custom (very basic) Quad class too, which does the same thing (also, only one instance). And from what you've said, if the Sprite class is an "intelligent" quad rendered I'll just stick with my "dumb but hopefully faster" one ;)

Thanks all.
The thing is that with the spriteinterface you can just sort of draw textures in the next frame and it will then only have to render one picture each frame. With the simple quad rendering engine it just renders them immidiately to the frame. Which is basically the same as if you used d3dxspriteinterface->Flush() every time after d3dxspriteinterface->Draw(), meaning that the spriteinterface should be faster unless you draw only one texture per frame. (It's nearly as fast in that case also.)
I don't know how incorrectly I explained that but you propably got the idea.

With 600-950 fps on the spriteinterface for a typical scene on a fairly typical quite modern computer anyone should not complain.

This topic is closed to new replies.

Advertisement