forked from VirtualDrivers/Virtual-Display-Driver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathframe_handler.h
More file actions
33 lines (28 loc) · 985 Bytes
/
frame_handler.h
File metadata and controls
33 lines (28 loc) · 985 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef FRAME_HANDLER_H
#define FRAME_HANDLER_H
#include <d3d11.h>
#include <dxgi1_2.h>
#include <DirectXMath.h>
#include <wdf.h>
#include <iddcx.h>
struct PerFrameBuffer {
DirectX::XMFLOAT4 resolution;
float time;
float padding[3];
};
class FrameHandler {
public:
static ID3D11Device* g_device;
static ID3D11DeviceContext* g_deviceContext;
static ID3D11VertexShader* g_vertexShader;
static ID3D11PixelShader* g_pixelShader;
static ID3D11InputLayout* g_inputLayout;
static ID3D11Buffer* g_constantBuffer;
static ID3D11RenderTargetView* g_outputRTV;
static bool enabled;
static void InitializeFrameHandler(ID3D11Device* device, ID3D11DeviceContext* context, const wchar_t* shaderFilePath);
static NTSTATUS AssignSwapChain(IDDCX_SWAPCHAIN hSwapChain, IDXGISwapChain* dxgiSwapChain);
static void ProcessFrame(IDDCX_SWAPCHAIN hSwapChain, LARGE_INTEGER PresentationTime);
static bool IsEnabled() { return enabled; }
};
#endif