summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-04-21 05:36:28 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-04-21 05:36:28 +0000
commit8435a45f64cef0985b340e91d6af3af6ffdb058c (patch)
tree89c9a6298f41b5f37089eb1f5ef8a18a489f61ef /Graphics/GraphicsEngineD3D12
parentAdded comments (diff)
downloadDiligentCore-8435a45f64cef0985b340e91d6af3af6ffdb058c.tar.gz
DiligentCore-8435a45f64cef0985b340e91d6af3af6ffdb058c.zip
Reworked SetRenderTargets() function to set framebuffer size
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp2
1 files changed, 2 insertions, 0 deletions
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<DeviceContextD3D12Impl>();
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();