summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D11
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-10-09 02:51:25 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-10-09 02:51:25 +0000
commitd708b5ea21bd607c79bde7f578707a62e40f1d4f (patch)
tree213759dcd691807dcf871b38469c6e2e77248760 /Graphics/GraphicsEngineD3D11
parentCosmetic changes (diff)
downloadDiligentCore-d708b5ea21bd607c79bde7f578707a62e40f1d4f.tar.gz
DiligentCore-d708b5ea21bd607c79bde7f578707a62e40f1d4f.zip
Fixed transitoin to fullscreen mode in D3D11
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
-rwxr-xr-xGraphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h3
-rwxr-xr-xGraphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp6
2 files changed, 9 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h
index 30f5c83f..6261837e 100755
--- a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h
@@ -106,6 +106,9 @@ public:
/// states.
void ReleaseCommittedShaderResources();
+ /// Unbinds all render targets. Used when resizing the swap chain.
+ void ResetRenderTargets();
+
/// Number of different shader types (Vertex, Pixel, Geometry, Domain, Hull, Compute)
static constexpr int NumShaderTypes = 6;
diff --git a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp
index d848c5b0..da225356 100755
--- a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp
@@ -1282,6 +1282,12 @@ namespace Diligent
pTexD3D11->ClearState(D3D11TextureState::DepthStencil);
}
+ void DeviceContextD3D11Impl::ResetRenderTargets()
+ {
+ TDeviceContextBase::ResetRenderTargets();
+ m_pd3d11DeviceContext->OMSetRenderTargets(0, nullptr, nullptr);
+ }
+
void DeviceContextD3D11Impl::SetRenderTargets( Uint32 NumRenderTargets, ITextureView* ppRenderTargets[], ITextureView* pDepthStencil )
{
if( TDeviceContextBase::SetRenderTargets( NumRenderTargets, ppRenderTargets, pDepthStencil ) )