public static void ClearDepthStencilView(this ID3D11DeviceContext context, ID3D11DepthStencilView depthStencilView, D3D11_CLEAR_FLAG flags, float depth, byte stencil) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (depthStencilView == null) { throw new ArgumentNullException(nameof(depthStencilView)); } context.ClearDepthStencilView(depthStencilView, (uint)flags, depth, stencil); }