> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CreateSampler

> 创建封装纹理采样信息的采样器对象。

创建封装纹理采样信息的采样器对象。

## 语法

```cpp theme={null}
void CreateSampler(
    const D3D12_SAMPLER_DESC  pDesc,
    D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor
)
```

### 参数

*pDesc \[in]*\
类型：const D3D12\_SAMPLER\_DESC \*

指向描述采样器的 [D3D12\_SAMPLER\_DESC](/reference/graphics/d3d12/structs/d3d12_sampler_desc_public) 结构体的指针。

*DestDescriptor \[in]*\
类型：D3D12\_CPU\_DESCRIPTOR\_HANDLE

描述表示存放采样器的堆起始位置的 CPU 描述符句柄。

### 返回值

类型：void

无。

## 要求

**头文件：** d3d12\_xs.h 或 d3d12\_x.h\
**库：** d3d12\_xs.lib 或 d3d12\_x.lib\
**支持的平台**：XBOX Series 主机和 XBOX One 系列

## 另请参阅

[ID3D12Device](/reference/graphics/d3d12_x/interfaces/id3d12device/id3d12device)


## Related topics

- [D3D12_SAMPLER_DESC](/zh-CN/reference/graphics/d3d12/structs/d3d12_sampler_desc_public.md)
- [D3D12_CPU_DESCRIPTOR_HANDLE](/zh-CN/reference/graphics/d3d12/structs/d3d12_cpu_descriptor_handle_public.md)
- [XBOX Series X|S 上的 Sampler Feedback 与 SFS](/zh-CN/build/core-features/graphics/newfeatures/sfs/index.md)
- [D3D12_STATIC_SAMPLER_DESC](/zh-CN/reference/graphics/d3d12/structs/d3d12_static_sampler_desc_public.md)
- [D3D12_ROOT_SIGNATURE_DESC1](/zh-CN/reference/graphics/d3d12/structs/d3d12_root_signature_desc1_public.md)
