Пример #1
0
        public static IComObject <ID3D11DepthStencilState> CreateDepthStencilState(this ID3D11Device device, D3D11_DEPTH_STENCIL_DESC desc)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            device.CreateDepthStencilState(ref desc, out var state).ThrowOnError();
            return(new ComObject <ID3D11DepthStencilState>(state));
        }
Пример #2
0
 public static IComObject <ID3D11DepthStencilState> CreateDepthStencilState(this IComObject <ID3D11Device> device, D3D11_DEPTH_STENCIL_DESC desc) => CreateDepthStencilState(device?.Object, desc);