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

# BeginRenderPass (XBOX Series 主机)

> 通过在渲染过程期间绑定一组输出资源来标记渲染过程的开始。这些绑定针对一个或多个渲染目标视图 (RTV) 和/或深度模板视图 (DSV)。

通过在渲染过程期间绑定一组输出资源来标记渲染过程的开始。这些绑定针对一个或多个渲染目标视图 (RTV) 和/或深度模板视图 (DSV)。

## 语法

```cpp theme={null}
void BeginRenderPass(
    UINT NumRenderTargets,
    const D3D12_RENDER_PASS_RENDER_TARGET_DESC  pRenderTargets,
    const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC  pDepthStencil,
    D3D12_RENDER_PASS_FLAGS Flags
)
```

### 参数

*NumRenderTargets*\
类型：UINT

一个 **UINT**。要绑定的渲染目标的数量。

*pRenderTargets*\
类型：const D3D12\_RENDER\_PASS\_RENDER\_TARGET\_DESC \*

指向常量 [D3D12\_RENDER\_PASS\_RENDER\_TARGET\_DESC](/reference/graphics/d3d12/structs/d3d12_render_pass_render_target_desc_public) 的指针，它描述了对一个或多个渲染目标视图 (RTV) 的绑定（在渲染过程期间固定），以及它们的开始和结束访问特性。

*pDepthStencil*\
类型：const D3D12\_RENDER\_PASS\_DEPTH\_STENCIL\_DESC \*

指向常量 [D3D12\_RENDER\_PASS\_DEPTH\_STENCIL\_DESC](/reference/graphics/d3d12/structs/d3d12_render_pass_depth_stencil_desc_public) 的指针，它描述了对深度模板视图 (DSV) 的绑定（在渲染过程期间固定），以及其开始和结束访问特性。

*Flags*\
类型：D3D12\_RENDER\_PASS\_FLAGS

一个 [D3D12\_RENDER\_PASS\_FLAGS](/reference/graphics/d3d12/enums/d3d12_render_pass_flags_public)。渲染过程的性质/要求；例如，它是暂停的还是恢复的渲染过程，或者它是否要写入无序访问视图。

### 返回值

类型：void

无。

## 要求

**头文件：** d3d12\_xs.h\
**库：** d3d12\_xs.lib\
**支持的平台**：XBOX Series 主机

## 另请参阅

[EndRenderPass](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_endrenderpass_public)

[ID3D12GraphicsCommandList4](/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList4/id3d12graphicscommandlist4)

[渲染](https://learn.microsoft.com/en-us/windows/win32/direct3d12/rendering)


## Related topics

- [EndRenderPass (XBOX Series 主机)](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_endrenderpass_public.md)
- [D3D12_RENDER_PASS_FLAGS (XBOX Series 主机)](/zh-CN/reference/graphics/d3d12/enums/d3d12_render_pass_flags_public.md)
- [D3D12_RENDER_PASS_BEGINNING_ACCESS](/zh-CN/reference/graphics/d3d12/structs/d3d12_render_pass_beginning_access_public.md)
- [D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE](/zh-CN/reference/graphics/d3d12/enums/d3d12_render_pass_beginning_access_type_public.md)
- [D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS](/zh-CN/reference/graphics/d3d12/structs/d3d12_render_pass_beginning_access_clear_parameters_public.md)
