I am making massive progress with a game engine I am writing, but am now wondering what would be more efficient. Rendering sprites using the DX9 sprite interface or just using textured quads?

I am calling sprite Begin, End, and Flush only once - even if I am rendering 1000 sprites, so I think I am going as efficient as I can in that regard. But, am wondering if I could squeeze out more potential if I used quads instead.

Best to encapsulate your sprite interface and use either a DX9 Spirte or quad implementation. This way you can test out different approaches without the necessarity to rewrite most of your code.

PS:

There might be although some trapdoors when using quads, e.g. filtering, I believe, that sprites are more memory copy operations, while quads will be more like rendering. When rendering you have some advantages (use shaders for some pretty effects) and disadvantages (filtering which could result in bluring your sprites when not really careful).

If you implement the exact same D3D operations yourself, it would have exactly the same performance as the D3DX version. Unfortunately I don't think the code for the D3DX sprite interface is available so that you can see what it's doing...

Generally the D3DX code can be improved upon, which is why it's just there as a helper library, rather than an actual part of D3D itself. It's likely just a wrapper around a dynamic vertex/index buffer, which it copies your rects into, and then constructs indexed-draw calls based on the textures used.

You can very likely build a better version yourself based around the specific needs of your game. There's some good info on buffer management here if you want to try:

Actually, I was just reading an XNA book that was talking about the guts of SpriteBatch. It turns out that Spritebatch uses textured quads because the GPU hardware is so specialized it turns out to be faster. I suspect if you roll your own textured quad drawing implementation, it might be marginally faster than SpriteBatch. But the ONLY true test of which one is faster is to code them and profile them both.

There might be although some trapdoors when using quads, e.g. filtering, I believe, that sprites are more memory copy operations, while quads will be more like rendering. When rendering you have some advantages (use shaders for some pretty effects) and disadvantages (filtering which could result in bluring your sprites when not really careful).

D3DX sprites are rendered using textured quads, so it's the same thing.

In my opinion the D3DX helper interfaces for sprites and fonts (and meshes etc.) are excellent when you are starting and actually may be perfectly fine for you for a long time. But sooner or later you'll want to implement it yourself. Especially ID3DXFont is very slow. The problem is that they are quite generalised and you can make a more efficient code by making it directly as you want and need.

Generally the D3DX code can be improved upon, which is why it's just there as a helper library, rather than an actual part of D3D itself. It's likely just a wrapper around a dynamic vertex/index buffer, which it copies your rects into, and then constructs indexed-draw calls based on the textures used.

This is exactly how it's implemented, yes. You can use PIX to view the actual D3D calls that the sprite interface makes and determine that it's nothing more than a wrapper.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.