mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
29 lines
501 B
C++
29 lines
501 B
C++
#pragma once
|
|
#include "pch.h"
|
|
#include "FrameSourceBase.h"
|
|
|
|
|
|
class GDIFrameSource : public FrameSourceBase {
|
|
public:
|
|
GDIFrameSource() {};
|
|
virtual ~GDIFrameSource() {}
|
|
|
|
bool Initialize() override;
|
|
|
|
ComPtr<ID3D11Texture2D> GetOutput() override;
|
|
|
|
bool Update() override;
|
|
|
|
private:
|
|
ComPtr<ID3D11DeviceContext> _d3dDC;
|
|
|
|
HWND _hwndSrc = NULL;
|
|
ComPtr<ID3D11Texture2D> _output;
|
|
|
|
RECT _srcClientRect{};
|
|
SIZE _srcClientSize{};
|
|
RECT _srcWndRect{};
|
|
SIZE _srcWndSize{};
|
|
|
|
std::vector<BYTE> _pixels;
|
|
};
|