> ## 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.

# D3D12_CLEAR_FLAGS

> 指定要從深度樣板檢視清除的項目。

指定要從深度樣板檢視清除的項目。

## 語法

```cpp theme={null}
typedef enum D3D12_CLEAR_FLAGS
{
    D3D12_CLEAR_FLAG_DEPTH = 1,
    D3D12_CLEAR_FLAG_STENCIL = 2
} D3D12_CLEAR_FLAGS
```

## 常數

| 常數 | 描述 |
| - | - |
| D3D12\_CLEAR\_FLAG\_DEPTH | 表示應清除深度緩衝區。 |
| D3D12\_CLEAR\_FLAG\_STENCIL | 表示應清除樣板緩衝區。 |

## 備註

此列舉由 [ID3D12GraphicsCommandList::ClearDepthStencilView](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_cleardepthstencilview_public) 使用。
這些旗標可以組合使用以清除全部。

## 需求

**標頭：** d3d12\_xs.h 或 d3d12\_x.h\
**程式庫：** d3d12\_xs.lib 或 d3d12\_x.lib\
**支援的平台**：XBOX Series 主機和 XBOX One 系列

## 另請參閱

[核心列舉](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-enumerations)


## Related topics

- [D3D12_SHADER_CACHE_CONTROL_FLAGS (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/enums/d3d12_shader_cache_control_flags_public.md)
- [D3D12_SHADER_CACHE_KIND_FLAGS (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/enums/d3d12_shader_cache_kind_flags_public.md)
- [D3D12_CLEAR_VALUE](/zh-TW/reference/graphics/d3d12/structs/d3d12_clear_value_public.md)
- [D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS](/zh-TW/reference/graphics/d3d12/structs/d3d12_render_pass_beginning_access_clear_parameters_public.md)
- [D3D12_DSV_FLAGS](/zh-TW/reference/graphics/d3d12/enums/d3d12_dsv_flags_public.md)
