11#pragma once
22#include < Windows.h>
33#include " graphics/GraphicsDevice.h"
4+ #include " graphics/Shader.h"
45#include " ImguiManager.h"
6+ #include " capturer/WGCCapturer.h"
7+ #include < memory>
8+ #include < d3dcompiler.h>
9+ #include < wrl/client.h>
510
611namespace lens
712{
@@ -19,8 +24,14 @@ namespace lens
1924
2025 static LRESULT CALLBACK WindowProcProxy (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
2126
27+ // Public getter for capturer access from UI panels
28+ capturer::WGCCapturer* GetCapturer () const { return m_capturer.get (); }
29+
2230 private:
2331 bool CreateLenWindow (int width = 800 , int height = 600 );
32+ bool CreateCaptureShaders ();
33+ bool CreateCaptureSampler ();
34+ bool CompileShader (const std::string& code, const char * entryPoint, const char * target, Microsoft::WRL::ComPtr<ID3DBlob>& blob);
2435
2536 LRESULT CALLBACK WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
2637
@@ -31,6 +42,13 @@ namespace lens
3142 graphics::GraphicsDevice* m_graphicsDevice;
3243 ImguiManager* m_imgui;
3344
45+ // WGC Capture related
46+ std::unique_ptr<capturer::WGCCapturer> m_capturer;
47+ graphics::Shader m_captureShader;
48+ Microsoft::WRL::ComPtr<ID3D11SamplerState> m_captureSampler;
49+ Microsoft::WRL::ComPtr<ID3D11Buffer> m_captureConstantBuffer;
50+ std::shared_ptr<graphics::Texture> m_lastCapturedFrame;
51+
3452 int width;
3553 int height;
3654 std::wstring m_className;
0 commit comments