texture 类

纹理是在范围域中的 accelerator_view 上的数据聚合。 它是变量集合,每个元素在范围域中。 每个变量都保留与 C++ 基元类型(unsigned int、int、float 或 double)、标量类型(normunorm)或短向量类型相对应的值。

template <
   typename _Value_type,
   int _Rank
>
class texture;

参数

  • _Value_type
    纹理中元素的类型。

  • _Rank
    纹理的等级。

成员

公共 Typedefs

名称

描述

scalar_type

标量类型。

value_type

值类型。

公共构造函数

名称

描述

texture::texture 构造函数

初始化 texture 类的新实例。

texture::~texture 析构函数

销毁纹理对象。

公共方法

名称

描述

texture::copy_to 方法

通过执行深层复制来将纹理对象复制到目标。

texture::data 方法

返回 CPU 指针到该纹理的原始数据。

texture::get 方法

返回位于指定索引处的元素的值。

texture::get_associated_accelerator_view 方法

返回待复制的纹理的优选目标的 accelerator_view

texture::get_depth_pitch 方法

返回介于 CPU 上 3D 暂存纹理中每个深度切片之间的字节数。

texture::get_row_pitch 方法

返回介于 CPU 上 2D 或 3D 暂存纹理中每行之间的字节数。

texture::set 方法

设置指定索引处的元素的值。

公共运算符

名称

描述

texture::operator() 运算符

返回参数指定的元素值。

texture::operator[] 运算符

返回位于指定索引处的元素。

texture::operator= 运算符

将指定的纹理对象复制到此对象中。

公共常量

名称

描述

texture::rank 常量

获取纹理对象的秩。

公共数据成员

名称

描述

texture::associated_accelerator_view 数据成员

获取为将该纹理复制到的首选目标的 accelerator_view

texture::depth_pitch 数据成员

获取介于 CPU 上 3D 暂存纹理中的每个深度切片之间的字节数。

texture::row_pitch 数据成员

获取介于 CPU 上 2D 或 3D 暂存纹理中每行之间的字节数。

继承层次结构

_Texture_base

texture

要求

**标头:**amp_graphics.h

**命名空间:**Concurrency::graphics

请参见

参考

Concurrency::graphics 命名空间