Hey.
I'm trying to write a small chunk of code to grab the backbuffer into an array of pixels. I've barely used directX before as I'm more of a OpenGL fan.
My wish is to actually replace some code in a project that grabs the backbuffer using BitBlt and DC which is very slow.
This is supposed to work on all computers and that's why I chose directx7.
My question is.. how would I do that?
Thank you.
views:
12answers:
1TBH DirectX 9 will work even with ancient cards. You don't have all the features available but you have a a SHED load more usable information out there. Although I think you might be a bit knackered on Win 95/9/me support and win 2K. Bear in mind NT4 never had a decent version of DirectX.
Alas I don't have the DX7 docs anywhere handy but I'm pretty sure you could just get the back buffer surface and then lock it to get at the data. Though you need to bear in mind just how slow grabbing the back buffer can be, especially on old cards. Copying the back buffer from local video memory to system memory across the PCI or AGP bus is incredibly slow.
What exactly are you trying to achieve? There must be better ways to achieve what you are after doing ...