Exemplo n.º 1
0
 /// <summary>
 ///   Constructs a new <see cref = "T:SharpDX.Direct3D10.SamplerState" /> based on the specified description.
 /// </summary>
 /// <param name = "device">The device with which to associate the state object.</param>
 /// <param name = "description">The state description.</param>
 /// <returns>The newly created object.</returns>
 public SamplerState(Device device, ref SamplerStateDescription description)
     : base(IntPtr.Zero)
 {
     device.CreateSamplerState(ref description, this);
 }
Exemplo n.º 2
0
 private static void ConfigureLinearSampler(out SamplerStateDescription description)
 {
     description.Filter = Filter.MinMagMipLinear;
     description.AddressU = TextureAddressMode.Clamp;
     description.AddressV = TextureAddressMode.Clamp;
     description.AddressW = TextureAddressMode.Clamp;
     description.BorderColor = Color.Transparent.ToColor4();
     description.ComparisonFunction = Comparison.Never;
     description.MaximumAnisotropy = 16;
     description.MaximumLod = float.MaxValue;
     description.MinimumLod = 0.0f;
     description.MipLodBias = 0.0f;
 }