Hi,
I need to render bitmaps really fast with great performance.
Since I at the same time need to do other CPU demanding operations it is prefered if the rendering can be handled as much as possible by the graphics card. But the rendering must perform ok even if there is no 3D support in the graphics card.
I have tried several rendering methods without coming to a conclusion.
I have tried these methods:
MFC:
----------------------------
CDC::StretchDIBits
CDC::StretchBlt
CDC::BitBlt
GDI:
----------------------------
SetDIBitsToDevice
DirectDraw:
----------------------------
IDirectDrawSurface7::BltFast
DirectX 9
----------------------------
IDirect3DDevice9::SetTexture
IDirect3DDevice9::StretchRect
ID3DXSprite::Draw
One method is by far fastest on all three systems I have tested with.
The system setup is similar for all three, except for the graphics cards:
Windows XP. service pack 2
Intel Pentium D CPU 3.40 GHz, 2GB Ram
The graphic cards differ accordingly:
1. Matrox Millenium G550. 32MB
2. Intel 82915. 128MB
3. Geforce8600GT 256Mb
The by far fastest rendering method is "IDirectDrawSurface7::BltFast".
It is also the only method which is slowest on system 1 with the worst graphics card, and by far fastest on system 3 with the best card.
Many of the other methods are worst on system 3, with the best graphics card!
However, I'am not very happy with using an old method from DDraw7, when there should be methods which are faster and more optimized for new graphic cards in DirectX 9. Furthermore BltFast does not support resizing.
But which method is this, that is best optimized for new graphics cards but also has good performance on computers with old graphics cards? And how do I use it to get the best performance and to minimize CPU usage, while letting the GPU do the work when supported by the graphics card?
Thanks for all help!