Compartilhar via


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.

Syntax

class sampler;  

Members

Public Constructors

Name Description
sampler::sampler Constructor Overloaded. Constructs a sampler instance.

Public Methods

Name Description
sampler::get_address_mode Method Returns the address_mode that’s associated with the sampler object.
sampler::get_border_color Method Returns the border color that’s associated with the sampler object.
sampler::get_filter_mode Method Returns the filter_mode that’s associated with the sampler object.

Public Operators

Name Description
sampler::operator= Operator Overloaded. Assignment operator.

Public Data Members

Name Description
sampler::address_mode Data Member Gets the address mode of the sampler object.
sampler::border_color Data Member Gets the border color of the sampler object.
sampler::filter_mode Data Member Gets the filter mode of the sampler object.

Inheritance Hierarchy

sampler

Requirements

Header: amp_graphics.h

Namespace: concurrency::graphics

sampler::sampler Constructor

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.

sampler::address_mode Data Member

Gets the address mode of the sampler object.

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

sampler::border_color Data Member

Gets the border color of the sampler object.

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

sampler::filter_mode Data Member

Gets the filter mode of the sampler object.

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

sampler::get_address_mode Method

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.

sampler::get_border_color Method

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.

sampler::get_filter_mode Method

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.

sampler::operator= Operator

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.

See Also

Concurrency::graphics Namespace