From 8435a45f64cef0985b340e91d6af3af6ffdb058c Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Fri, 20 Apr 2018 22:36:28 -0700 Subject: Reworked SetRenderTargets() function to set framebuffer size --- Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Graphics/GraphicsEngineD3D12') diff --git a/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp index 7aba15b9..4ccadb64 100644 --- a/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp @@ -158,6 +158,8 @@ void SwapChainD3D12Impl::UpdateSwapChain(bool CreateNew) { auto *pImmediateCtxD3D12 = pDeviceContext.RawPtr(); bool bIsDefaultFBBound = pImmediateCtxD3D12->IsDefaultFBBound(); + if(bIsDefaultFBBound) + pImmediateCtxD3D12->ClearRenderTargets(); // All references to the swap chain must be released before it can be resized m_pBackBufferRTV.clear(); -- cgit v1.2.3