0

I am sorry if it appears this question has been done to death. I've done plenty of research however, and it seems there is no well known solution to what seems a simple problem: take a screenshot in windows.

There's a catch of course - the screenshot is to be manipulated in some way (gpu side, with shaders/etc), so there is no option of a slow copy to system memory. Instead the copy must somehow stay in graphics memory. GetFrontBuffer and the like a limited in this sense (they don't work full stop, I've checked).

I am aware of several closed questions on the stack exchange network ("Don't bother, not possible") and 2 with open bounties that amount to solving this problem.

Windows 7 introduces some changes to the graphics system, so now there is a compositing window manager,etc. Apparently GDI is also now 'hardware accelerated' so I was hoping this would have exposed a simple path for a possible solution:

gdi desktop window device context (in gpu memory) -> some direct2d or direct3d surface

In my particular case, just getting the DC in gpu memory is sufficient, but I am looking for a general solution.

So, how does one screnshot gpu side in Windows?

user3125280
  • 2,779
  • 1
  • 14
  • 23
  • Have you looked at this: http://msdn.microsoft.com/en-us/library/windows/desktop/dd183402(v=vs.85).aspx and this: http://msdn.microsoft.com/en-us/library/windows/desktop/dd370971(v=vs.85).aspx – Taylor Brandstetter Jan 03 '14 at 15:58
  • @TaylorBrandstetter yep - i was wondering if such technique would be hardware accelerated (i know it could, because it uses accelerated bitblip, but may be a special case, since it access the root desktop) – user3125280 Jan 03 '14 at 16:03
  • I'm not completely sure. I just remember that back when I was trying to do a basic screen capture, the GDI method ended up being fastest. You may also want to look into the top answer on this question, since it's pure direct3d: http://stackoverflow.com/questions/5069104/fastest-method-of-screen-capturing – Taylor Brandstetter Jan 03 '14 at 16:15
  • @TaylorBrandstetter unfortunately that is a similar solution to the one i tried - in pDestTarget must be in system memory, so this would involve unnecessary gpu->cpu copies (currently the bottleneck) – user3125280 Jan 03 '14 at 16:19

0 Answers0