Esempio n. 1
0
        public static IComObject <ID3D11SamplerState> CreateSamplerState(this ID3D11Device device, D3D11_SAMPLER_DESC desc)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            device.CreateSamplerState(ref desc, out var state).ThrowOnError();
            return(new ComObject <ID3D11SamplerState>(state));
        }
Esempio n. 2
0
 public static IComObject <ID3D11SamplerState> CreateSamplerState(this IComObject <ID3D11Device> device, D3D11_SAMPLER_DESC desc) => CreateSamplerState(device?.Object, desc);