sampler Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The sampler class aggregates sampling configuration information to be used for texture sampling.

class sampler;  

Public Constructors

NameDescription
sampler::sampler ConstructorOverloaded. Constructs a sampler instance.

Public Methods

NameDescription
sampler::get_address_mode MethodReturns the address_mode that’s associated with the sampler object.
sampler::get_border_color MethodReturns the border color that’s associated with the sampler object.
sampler::get_filter_mode MethodReturns the filter_mode that’s associated with the sampler object.

Public Operators

NameDescription
sampler::operator= OperatorOverloaded. Assignment operator.

Public Data Members

NameDescription
sampler::address_mode Data MemberGets the address mode of the sampler object.
sampler::border_color Data MemberGets the border color of the sampler object.
sampler::filter_mode Data MemberGets the filter mode of the sampler object.

sampler

Header: amp_graphics.h

Namespace: concurrency::graphics

Constructs an instance of the sampler Class.

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);

Parameters

_Filter_mode
The filter mode to be used in sampling.

_Address_mode
The addressing mode to be used in sampling for all dimensions.

_Border_color
The border color to be used if the address mode is address_border. The default value is float_4(0.0f, 0.0f, 0.0f, 0.0f).

_Other
[5] Copy Constructor
The sampler object to copy into the new sampler instance.

[6] Move Constructor
The sampler object to move into the new sampler instance.

Gets the address mode of the sampler object.

__declspec(property(get= get_address_mode)) Concurrency::graphics::address_mode address_mode;  

Gets the border color of the sampler object.

__declspec(property(get= get_border_color)) Concurrency::graphics::float_4 border_color;  

Gets the filter mode of the sampler object.

__declspec(property(get= get_filter_mode)) Concurrency::graphics::filter_mode filter_mode;  

Returns the filter mode that’s configured for this sampler.

Concurrency::graphics::address_mode get_address_mode() const __GPU;  

Return Value

The address mode that’s configured for the sampler.

Returns the border color that’s configured for this sampler.

Concurrency::graphics::float_4 get_border_color() const restrict(amp, cpu);

Return Value

A float_4 that contains the border color.

Returns the filter mode that’s configured for this sampler.

Concurrency::graphics::filter_mode get_filter_mode() const restrict(amp, cpu);

Return Value

The filter mode that’s configured for the sampler.

Assigns the value of another sampler object to an existing sampler.

sampler& operator= (// [1] copy assignment operator const sampler& _Other) restrict(amp,
    cpu);

 
sampler& operator= (// [2] move assingment operator sampler&& _Other) restrict(amp,
    cpu);

Parameters

_Other
[1] Copy Assignment Operator
The sampler object to copy into this sampler.

[2] Move Assignment Operator
The sampler object to move into this sampler.

Return Value

A reference to this sampler instance.

Concurrency::graphics Namespace

Show: