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

# OMSetRenderTargets

> レンダー ターゲットと深度ステンシルの CPU 記述子ハンドルを設定します。

レンダー ターゲットと深度ステンシルの CPU 記述子ハンドルを設定します。

## 構文

```cpp theme={null}
void OMSetRenderTargets(
    UINT NumRenderTargetDescriptors,
    const D3D12_CPU_DESCRIPTOR_HANDLE  pRenderTargetDescriptors,
    BOOL RTsSingleHandleToDescriptorRange,
    const D3D12_CPU_DESCRIPTOR_HANDLE  pDepthStencilDescriptor
)
```

### パラメーター

*NumRenderTargetDescriptors \[in]*\
型: UINT

<i>pRenderTargetDescriptors</i> 配列内のエントリ数 (0 から **D3D12\_SIMULTANEOUS\_RENDER\_TARGET\_COUNT** の範囲)。このパラメーターがゼロ以外の場合、pRenderTargetDescriptors が指す配列内のエントリ数は、このパラメーターの数と等しくなければなりません。

*pRenderTargetDescriptors \[in, optional]*\
型: const D3D12\_CPU\_DESCRIPTOR\_HANDLE \*

レンダー ターゲット記述子のヒープの先頭を表す CPU 記述子ハンドルを記述する [D3D12\_CPU\_DESCRIPTOR\_HANDLE](/reference/graphics/d3d12/structs/d3d12_cpu_descriptor_handle_public) 構造体の配列を指定します。このパラメーターが NULL で NumRenderTargetDescriptors が 0 の場合、レンダー ターゲットはバインドされません。

*RTsSingleHandleToDescriptorRange \[in]*\
型: BOOL

**True** は、渡されたハンドルが <i>NumRenderTargetDescriptors</i> 個の記述子の連続範囲へのポインターであることを意味します。このケースは、バインドする記述子のセットがすでにメモリ上で連続している場合に便利です (最初の 1 つへのハンドルだけで済みます)。たとえば、<i>NumRenderTargetDescriptors</i> が 3 の場合、メモリ レイアウトは次のようになります。

<img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/nda/graphics/oms_true.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=ca9a65f296f515512968ef8e99ddb20e" alt="パラメーターが true に設定されている場合のメモリ レイアウト" width="221" height="147" data-path="images/nda/graphics/oms_true.png" />

このケースでは、ドライバーはハンドルをデリファレンスし、その後、指し示されているメモリをインクリメントします。

**False** は、ハンドルが <i>NumRenderTargetDescriptors</i> 個のハンドル配列の最初のものであることを意味します。false の場合、アプリケーションは異なる場所からの記述子のセットを一度にバインドできます。同じく <i>NumRenderTargetDescriptors</i> が 3 と仮定すると、メモリ レイアウトは次のようになります。

<img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/nda/graphics/oms_false.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=c88e0ec402d2cb0c624ed18ccc174c42" alt="パラメーターが false に設定されている場合のメモリ レイアウト" width="228" height="222" data-path="images/nda/graphics/oms_false.png" />

このケースでは、ドライバーはメモリ上で互いに隣接していると想定される 3 つのハンドルをデリファレンスします。

*pDepthStencilDescriptor \[in, optional]*\
型: const D3D12\_CPU\_DESCRIPTOR\_HANDLE \*

深度ステンシル記述子を保持するヒープの先頭を表す CPU 記述子ハンドルを記述する [D3D12\_CPU\_DESCRIPTOR\_HANDLE](/reference/graphics/d3d12/structs/d3d12_cpu_descriptor_handle_public) 構造体へのポインター。このパラメーターが NULL の場合、深度ステンシル記述子はバインドされません。

### 戻り値

型: void

なし。

## 要件

**ヘッダー:** d3d12\_xs.h または d3d12\_x.h\
**ライブラリ:** d3d12\_xs.lib または d3d12\_x.lib\
**サポートされるプラットフォーム**: XBOX Series 本体および XBOX One ファミリ

## 関連項目

[ID3D12GraphicsCommandList](/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList/id3d12graphicscommandlist_xs)


## Related topics

- [D3D12_CPU_DESCRIPTOR_HANDLE](/ja-jp/reference/graphics/d3d12/structs/d3d12_cpu_descriptor_handle_public.md)
- [CreateRenderTargetView](/ja-jp/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createrendertargetview_public.md)
- [D3D12_RENDER_PASS_RENDER_TARGET_DESC](/ja-jp/reference/graphics/d3d12/structs/d3d12_render_pass_render_target_desc_public.md)
- [PartyLocalChatControl::SetAudioRenderVolume](/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_setaudiorendervolume.md)
- [D3D12_RENDER_TARGET_BLEND_DESC](/ja-jp/reference/graphics/d3d12/structs/d3d12_render_target_blend_desc_public.md)
