> ## 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)。

## 語法

```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](/zh-TW/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](/zh-TW/reference/graphics/d3d12/structs/d3d12_render_pass_depth_stencil_desc_public) 的指標，描述對深度樣板檢視 (DSV) 的繫結 (在轉譯階段期間固定不變)，以及其開始與結束存取特性。

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

[D3D12\_RENDER\_PASS\_FLAGS](/zh-TW/reference/graphics/d3d12/enums/d3d12_render_pass_flags_public)。轉譯階段的性質/需求；例如，它是暫停或繼續的轉譯階段，或者是否要寫入無序存取檢視。

### 傳回值

類型：void

無。

## 需求

**標頭:** d3d12\_xs.h\
**程式庫:** d3d12\_xs.lib\
**支援的平台**: XBOX Series 主機

## 另請參閱

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

[ID3D12GraphicsCommandList4](/zh-TW/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList4/id3d12graphicscommandlist4)

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


## Related topics

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