Skip to content

Instantly share code, notes, and snippets.

View fhqmwy's full-sized avatar
🤩
I may be slow to respond.

fhqmwy

🤩
I may be slow to respond.
View GitHub Profile
@t-mat
t-mat / dx11-screen-capture.cpp
Created August 28, 2020 09:36
[WIN32] DX11 DXGI Screen capture sample
// WIN32/C++17: DX11 DXGI Screen capture sample
//
// References:
// - https://github.com/microsoftarchive/msdn-code-gallery-microsoft/tree/master/Official%20Windows%20Platform%20Sample/DXGI%20desktop%20duplication%20sample
// - https://github.com/microsoft/DirectXTex/blob/master/ScreenGrab/ScreenGrab11.cpp
// - https://docs.microsoft.com/en-us/windows/win32/direct3ddxgi/desktop-dup-api
//
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <atlbase.h>