Skip to content

About

Screen capturing via DirectX using IDXGIOutputDuplication

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

Screen capturing via DirectX

Implementation of screen capture via DirectX using IDXGIOutputDuplication in C# without any dependencies.
Emphasis on perfomance, but unfortunately due to a language limitation is completely covered by boxing structures into interfaces.

Samples

Both samples can be found in Program.cs
But for illustrative purposes:

using var capturer = new ScreenCapturer();

Frame frame;
while (true)
  if (capturer.CaptureFrame(&frame))
     …

or with the choice of device and screen:

GraphicDevice device;
GraphicDevice.EnumDevice(&device, index: 0);

Screen screen;
Screen.EnumScreen(&screen, &device, index: 0);

Duplicator duplicator;
Duplicator.Create(&device, &screen, &duplicator);

Frame frame;
while (true)
   if (duplicator.CaptureFrame(&frame))
      …

About

Screen capturing via DirectX using IDXGIOutputDuplication

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Contributors

Languages