Exemplo n.º 1
0
        public static IComObject <ID3D11BlendState> CreateBlendState(this ID3D11Device device, D3D11_BLEND_DESC desc)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            device.CreateBlendState(ref desc, out var state).ThrowOnError();
            return(new ComObject <ID3D11BlendState>(state));
        }
Exemplo n.º 2
0
 public static IComObject <ID3D11BlendState> CreateBlendState(this IComObject <ID3D11Device> device, D3D11_BLEND_DESC desc) => CreateBlendState(device?.Object, desc);