sampler::sampler 构造函数

构造 sampler 类 的实例。

sampler() restrict(cpu);        // [1] default constructor

sampler(                        // [2] constructor
   filter_mode _Filter_mode
) restrict(cpu);

sampler(                        // [3] constructor
   address_mode _Address_mode,
   float_4 _Border_color = float_4(0.0f, 0.0f, 0.0f, 0.0f)
) restrict(cpu);

sampler(                        // [4] constructor
   filter_mode _Filter_mode,
   address_mode _Address_mode,
   float_4 _Border_color = float_4(0.0f, 0.0f, 0.0f, 0.0f)
) restrict(cpu);

sampler(                        // [5] copy constructor
   const sampler& _Other
) restrict(amp, cpu);

sampler(                        // [6] move constructor
   sampler &&_Other
) restrict(amp, cpu);

参数

  • _Filter_mode
    用于采样的筛选器模式。

  • _Address_mode
    用于为所有维度采样的寻址模式。

  • _Border_color
    如果寻址模式是 address_border,则要使用边框颜色。 默认值为 float_4(0.0f, 0.0f, 0.0f, 0.0f)。

  • _Other

    • [5] 复制构造函数
      用于复制到新 sampler 实例的 sampler 对象。

    • [6] 移动构造函数
      用于移动到新 sampler 实例的 sampler 对象。

构造

  • [1] 默认构造函数
    通过使用线性筛选、夹紧的解决和透明边框颜色 (float_4(0.0f, 0.0f, 0.0f, 0.0f)) 来构造采样器实例。

  • [2] 构造函数
    通过使用指定的筛选模式、夹紧的解决和透明边框颜色 (float_4(0.0f, 0.0f, 0.0f, 0.0f)) 来构造采样器实例。

  • [3] 构造函数
    通过使用指定的地址模式、线性筛选和透明边框颜色 (float_4(0.0f, 0.0f, 0.0f, 0.0f)) 来构造采样器实例。

  • [4] 构造函数
    通过使用指定的筛选模式和地址模式以及透明边框颜色 (float_4(0.0f, 0.0f, 0.0f, 0.0f)) 来构造采样器实例。

  • [5] 复制构造函数
    通过复制指定的采样器对象构造采样器实例。

  • [6] 移动构造函数
    通过将指定的采样器对象移动到新实例中来构造采样器实例。

备注

配置的筛选模式适用于最小化、最大化和 mipmap 筛选器。

配置的寻址模式适用于所有维度。

要求

**标头:**amp_graphics.h

**命名空间:**concurrency::graphics

请参见

参考

sampler 类