description | title | ms.date | f1_keywords | ms.assetid | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: texture Class |
texture Class |
11/04/2016 |
|
16e85d4d-e80a-474a-995d-8bf63fbdf34c |
A texture is a data aggregate on an accelerator_view
in the extent domain. It is a collection of variables, one for each element in an extent domain. Each variable holds a value corresponding to C++ primitive type ( unsigned int
, int
, float
, double
), a scalar type ( norm
, or unorm
), or a short vector type.
template <typename value_type, int _Rank>
class texture;
value_type
The type of the elements in the texture.
_Rank
The rank of the texture.
Name | Description |
---|---|
scalar_type |
Scalar types. |
value_type |
Value types. |
Name | Description |
---|---|
texture Constructor | Initializes a new instance of the texture class. |
~texture Destructor | Destroys the texture object. |
Name | Description |
---|---|
copy_to | Copies the texture object to the destination, by doing a deep copy. |
data | Returns a CPU pointer to the raw data of this texture. |
get | Returns the value of the element at the specified index. |
get_associated_accelerator_view | Returns the accelerator_view that is the preferred target for this texture to be copied to. |
get_depth_pitch | Returns the number of bytes between each depth slice in a 3D staging texture on the CPU. |
get_row_pitch | Returns the number of bytes between each row in a 2D or 3D staging texture on the CPU. |
set | Sets the value of the element at the specified index. |
Name | Description |
---|---|
operator() | Returns the element value that is specified by the parameters. |
operator[] | Returns the element that is at the specified index. |
operator= | Copies the specified texture object to this one. |
Name | Description |
---|---|
rank Constant | Gets the rank of the texture object. |
Name | Description |
---|---|
associated_accelerator_view | Gets the accelerator_view that is the preferred target for this texture to be copied to. |
depth_pitch | Gets the number of bytes between each depth slice in a 3D staging texture on the CPU. |
row_pitch | Gets the number of bytes between each row in a 2D or 3D staging texture on the CPU. |
_Texture_base
texture
Header: amp_graphics.h
Namespace: Concurrency::graphics
Destroys the texture
object.
~texture() restrict(cpu);
Gets the accelerator_view that is the preferred target for this texture to be copied to.
__declspec(property(get= get_associated_accelerator_view)) Concurrency::accelerator_view associated_accelerator_view;
Copies the texture
object to the destination, by doing a deep copy.
void copy_to(texture& _Dest) const;
void copy_to(writeonly_texture_view<value_type, _Rank>& _Dest) const;
_Dest
The object to copy to.
_Rank
The rank of the texture.
value_type
The type of the elements in the texture.
Returns a CPU pointer to the raw data of this texture.
void* data() restrict(cpu);
const void* data() const restrict(cpu);
A pointer to the raw data of the texture.
Gets the number of bytes between each depth slice in a 3D staging texture on the CPU.
__declspec(property(get= get_depth_pitch)) unsigned int depth_pitch;
Returns the value of the element at the specified index.
const value_type get(const index<_Rank>& _Index) const restrict(amp);
_Index
The index of the element.
The value of the element at the specified index.
Returns the accelerator_view that is the preferred target for this texture to be copied to.
Concurrency::accelerator_view get_associated_accelerator_view() const restrict(cpu);
The accelerator_view that is the preferred target for this texture to be copied to.
Returns the number of bytes between each depth slice in a 3D staging texture on the CPU.
unsigned int get_depth_pitch() const restrict(cpu);
The number of bytes between each depth slice in a 3D staging texture on the CPU.
Returns the number of bytes between each row in a 2-dimensional staging texture, or between each row of a depth slice in 3-dimensional staging texture.
unsigned int get_row_pitch() const restrict(cpu);
The number of bytes between each row in a 2-dimensional staging texture, or between each row of a depth slice in 3-dimensional staging texture.
Returns the element value that is specified by the parameters.
const value_type operator() (
const index<_Rank>& _Index) const restrict(amp);
const value_type operator() (
int _I0) const restrict(amp);
const value_type operator() (
int _I0,
int _I1) const restrict(amp);
const value_type operator() (
int _I0,
int _I1,
int _I2) const restrict(amp);
_Index
The index.
_I0
The most-significant component of the index.
_I1
The next-to-most-significant component of the index.
_I2
The least-significant component of the index.
_Rank
The rank of the index.
The element value that is specified by the parameters.
Returns the element that is at the specified index.
const value_type operator[] (const index<_Rank>& _Index) const restrict(amp);
const value_type operator[] (int _I0) const restrict(amp);
_Index
The index.
_I0
The index.
The element that is at the specified index.
Copies the specified texture object to this one.
texture& operator= (
const texture& _Other);
texture& operator= (
texture<value_type, _Rank>&& _Other);
_Other
The texture
object to copy from.
A reference to this texture
object.
Gets the rank of the texture
object.
static const int rank = _Rank;
Gets the number of bytes between each row in a 2D or 3D staging texture on the CPU.
__declspec(property(get= get_row_pitch)) unsigned int row_pitch;
Sets the value of the element at the specified index.
void set(
const index<_Rank>& _Index,
const value_type& value) restrict(amp);
_Index
The index of the element.
_Rank
The rank of the index.
value
The new value of the element.
Initializes a new instance of the texture
class.
texture(const Concurrency::extent<_Rank>& _Ext) restrict(cpu);
texture(int _E0) restrict(cpu);
texture(int _E0, int _E1) restrict(cpu);
texture(int _E0, int _E1, int _E2) restrict(cpu);
texture(
const Concurrency::extent<_Rank>& _Ext,
const Concurrency::accelerator_view& _Av) restrict(cpu);
texture(
int _E0,
const Concurrency::accelerator_view& _Av) restrict(cpu);
texture(
int _E0,
int _E1,
const Concurrency::accelerator_view& _Av) restrict(cpu);
texture(
int _E0,
int _E1,
int _E2,
const Concurrency::accelerator_view& _Av) restrict(cpu);
template<typename _Input_iterator>
texture(
const Concurrency::extent<_Rank>& _Ext,
_Input_iterator _Src_first,
_Input_iterator _Src_last) restrict(cpu);
template<typename _Input_iterator>
texture(
int _E0, _Input_iterator _Src_first, _Input_iterator _Src_last) restrict(cpu);
template<typename _Input_iterator>
texture(
int _E0,
int _E1,
_Input_iterator _Src_first,
_Input_iterator _Src_last) restrict(cpu);
template<typename _Input_iterator>
texture(
int _E0,
int _E1,
int _E2,
_Input_iterator _Src_first,
_Input_iterator _Src_last) restrict(cpu);
template<typename _Input_iterator>
texture(
const Concurrency::extent<_Rank>& _Ext,
_Input_iterator _Src_first,
_Input_iterator _Src_last,
const Concurrency::accelerator_view& _Av) restrict(cpu);
template<typename _Input_iterator>
texture(
int _E0,
_Input_iterator _Src_first,
_Input_iterator _Src_last,
const Concurrency::accelerator_view& _Av) restrict(cpu);
template<typename _Input_iterator>
texture(
int _E0,
int _E1,
_Input_iterator _Src_first,
_Input_iterator _Src_last,
const Concurrency::accelerator_view& _Av) restrict(cpu);
template<typename _Input_iterator>
texture(
int _E0,
int _E1,
int _E2,
_Input_iterator _Src_first,
_Input_iterator _Src_last,
const Concurrency::accelerator_view& _Av) restrict(cpu)) ;
texture(
int _E0,
unsigned int _Bits_per_scalar_element) restrict(cpu);
texture(
int _E0,
int _E1,
unsigned int _Bits_per_scalar_element) restrict(cpu);
texture(
int _E0,
int _E1,
int _E2,
unsigned int _Bits_per_scalar_element) restrict(cpu);
texture(
const Concurrency::extent<_Rank>& _Ext,
unsigned int _Bits_per_scalar_element,
const Concurrency::accelerator_view& _Av) restrict(cpu);
texture(
int _E0,
unsigned int _Bits_per_scalar_element,
const Concurrency::accelerator_view& _Av) ;
texture(
int _E0,
int _E1,
unsigned int _Bits_per_scalar_element,
const Concurrency::accelerator_view& _Av) restrict(cpu);
texture(
int _E0,
int _E1,
int _E2,
unsigned int _Bits_per_scalar_element,
const Concurrency::accelerator_view& _Av) restrict(cpu);
texture(
const Concurrency::extent<_Rank>& _Ext,
_In_ void* _Source,
unsigned int _Src_byte_size,
unsigned int _Bits_per_scalar_element) restrict(cpu);
texture(
int _E0,
_In_ void* _Source,
unsigned int _Src_byte_size,
unsigned int _Bits_per_scalar_element) restrict(cpu);
texture(
int _E0,
int _E1,
_In_ void* _Source,
unsigned int _Src_byte_size,
unsigned int _Bits_per_scalar_element) restrict(cpu);
texture(
int _E0,
int _E1,
int _E2,
_In_ void* _Source,
unsigned int _Src_byte_size,
unsigned int _Bits_per_scalar_element) restrict(cpu);
texture(
const Concurrency::extent<_Rank>& _Ext,
_In_ void* _Source,
unsigned int _Src_byte_size,
unsigned int _Bits_per_scalar_element,
const Concurrency::accelerator_view& _Av) ;
texture(
int _E0,
_In_ void* _Source,
unsigned int _Src_byte_size,
unsigned int _Bits_per_scalar_element,
const Concurrency::accelerator_view& _Av) restrict(cpu);
texture(
int _E0,
int _E1,
_In_ void* _Source,
unsigned int _Src_byte_size,
unsigned int _Bits_per_scalar_element,
const Concurrency::accelerator_view& _Av) restrict(cpu);
texture(
int _E0,
int _E1,
int _E2,
_In_ void* _Source,
unsigned int _Src_byte_size,
unsigned int _Bits_per_scalar_element,
const Concurrency::accelerator_view& _Av) restrict(cpu);
texture(
const texture& _Src,
const Concurrency::accelerator_view& _Acc_view);
texture(
texture&& _Other);
texture(
const Concurrency::extent<_Rank>& _Ext,
unsigned int _Bits_per_scalar_element,
const Concurrency::accelerator_view& _Av);
texture(
const texture& _Src);
_Acc_view
The accelerator_view that specifies the location of the texture.
_Av
The accelerator_view that specifies the location of the texture.
_Associated_av
An accelerator_view that specifies the preferred target for copies to or from this texture.
_Bits_per_scalar_element
The number of bits per each scalar element in the underlying scalar type of the texture. In general, supported value are 8, 16, 32, and 64. If 0 is specified, the number of bits is the same as the underlying scalar_type. 64 is only valid for double-based textures.
_Ext
The extent in each dimension of the texture.
_E0
The most significant component of the texture.
_E1
The next-to-most-significant component of the texture.
_E2
The least significant component of the extent of the texture.
_Input_iterator
The type of the input iterator.
_Mipmap_levels
The number of mipmap levels in the underlying texture. If 0 is specified, the texture will have the full range of mipmap levels down to the smallest possible size for the specified extent.
_Rank
The rank of the extent.
_Source
A pointer to a host buffer.
_Src
To texture to copy.
_Src_byte_size
The number of bytes in the source buffer.
_Src_first
A beginning iterator into the source container.
_Src_last
An ending iterator into the source container.
_Other
Other data source.
_Rank
The rank of the section.