diff options
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
| -rwxr-xr-x | Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h | 3 | ||||
| -rwxr-xr-x | Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp | 6 |
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 ) )
|
