2

I am trying to capture DWM's DirectX surface by using DXGI and GetDisplaySurfaceData() using Direct3D 10/11.

However, when I am taking ownership of the adapter's output with IDXGIOutput::TakeOwnership() before calling to GetDisplaySurfaceData(), the whole screen blacks out for a moment and then restores back (just as during display mode switching).

Why does this happen, and how can I prevent this?

Michael Mauderer
  • 3,777
  • 1
  • 22
  • 49
iank
  • 336
  • 4
  • 8

1 Answers1

0

I know this is extremely late. But for what it's worth, the documentation explicitly says that you are not supposed to call TakeOwnership() directly as the results will be unpredictable.

http://msdn.microsoft.com/en-us/library/windows/desktop/bb174558(v=vs.85).aspx

boogagiga
  • 49
  • 8
  • 1
    But this doesn't really answer how to avoid calling `TakeOwnership`, as it seems to be an requirement according to this answer http://stackoverflow.com/a/29698887/1175813 – Michael Mauderer Jun 20 '16 at 20:45