Compartir a través de


texture_view Class

Provides read access and write access to a texture. texture_view can only be used to read textures whose value type is int, unsigned int, or float that have default 32-bit bpse. To read other texture formats, use texture_view<const _Value_type, _Rank>.

template <
   typename _Value_type,
   int _Rank
>
class texture_view;

template <
   typename _Value_type,
   int _Rank
>
class texture_view : public details::_Texture_base<_Value_type, _Rank>;

template <
   typename _Value_type,
   int _Rank
>
class texture_view<const _Value_type, _Rank> : public details::_Texture_base<_Value_type, _Rank>;

Parameters

  • _Value_type
    The type of the elements in the texture aggregate.

  • _Rank
    The rank of the texture_view.

Members

Public Typedefs

Name

Description

value_type

The type of the elements in the texture aggregates.

coordinates_type

The type of the coordinate used to specify a texel in the texture_view—that is, a short_vector that has the same rank as the associated texture that has a value type of float.

gather_return_type

The return type used for gather operations—that is, a rank 4 short_vector that holds the four homogenous color components gathered from the four texel values sampled.

Public Constructors

Name

Description

texture_view::texture_view Constructor

Overloaded. Constructs a texture_view instance.

texture_view::~texture_view Destructor

Destroys the texture_view instance.

Public Methods

Name

Description

texture_view::gather_alpha Method

Overloaded. Samples the texture at the specified coordinates by using the specified sampling configuration and returns the alpha (w) components of the four sampled texels.

texture_view::gather_blue Method

Overloaded. Samples the texture at the specified coordinates by using the specified sampling configuration and returns the blue (z) components of the four sampled texels.

texture_view::gather_green Method

Overloaded. Samples the texture at the specified coordinates by using the specified sampling configuration and returns the green (y) components of the four sampled texels.

texture_view::gather_red Method

Overloaded. Samples the texture at the specified coordinates by using the specified sampling configuration and returns the red (x) components of the four sampled texels.

texture_view::get Method

Overloaded. Gets the element value by index.

texture_view::sample Method

Overloaded. Samples the texture at the specified coordinates and level of detail by using the specified sampling configuration.

texture_view::set Method

Sets the value of an element by index.

Public Operators

Name

Description

texture_view::operator() Operator

Overloaded. Gets the element value by index.

texture_view::operator[] Operator

Overloaded. Gets the element value by index.

texture_view::operator= Operator

Overloaded. Assignment operator.

Public Data Members

Name

Description

texture_view::value_type Data Member

The value type of the elements of the texture_view.

Inheritance Hierarchy

_Texture_base

texture_view

Requirements

Header: amp_graphics.h

Namespace: concurrency::graphics

See Also

Reference

Concurrency::graphics Namespace