I am trying to make a fast screen capture with direct x, but the performance is horrible.. This function GetFrontBufferData is some horrible crap.. It takes around 33ms to execute it, which is a horrible result considering i only want around 200px by 200px area... BAd performance is the the main problem.
Regardless if i set the resolution to 200 or 1300, the delay is the same(both for the buffer size and image resolution), which is even more stupid. I was trying to use that back buffer solution, found some tutorials and articles and code examples, but all of them will just freeze the program or return blank / black image all the times, regardless what i try.
The front buffer approach works good, but it's just useless, since standard HBITMAP and wingdi has similar performance if not better and the code is basically few lines of code. If someone could help me to get it to work i would be happy. All i have to do is somehow fix the performance, i guess as everyone suggested by using this backbuffer.