From 0801ced371e0cc81cc6fb50a1150e0238eecd542 Mon Sep 17 00:00:00 2001 From: Light Date: Mon, 21 Jun 2021 18:09:28 +0430 Subject: [PATCH] dx-OnWindowResize - Added dxGraphicsContext::OnWindowResize --- Engine/src/Platform/GraphicsAPI/DirectX/dxGraphicsContext.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Engine/src/Platform/GraphicsAPI/DirectX/dxGraphicsContext.cpp b/Engine/src/Platform/GraphicsAPI/DirectX/dxGraphicsContext.cpp index 504fc6e..d22537a 100644 --- a/Engine/src/Platform/GraphicsAPI/DirectX/dxGraphicsContext.cpp +++ b/Engine/src/Platform/GraphicsAPI/DirectX/dxGraphicsContext.cpp @@ -35,6 +35,10 @@ namespace Light { m_SharedContext = std::make_shared(m_Device, m_DeviceContext, m_SwapChain, m_RenderTargetView); } + void dxGraphicsContext::OnWindowResize(const WindowResizedEvent& event) + { + SetResolution(event.GetSize()); + } void dxGraphicsContext::SetupDeviceAndSwapChain(GLFWwindow* windowHandle) {