# D3D12RenderTargetView::GetCPUDescriptorHandle ## 函数签名 ```cpp D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandle() const ``` ## 描述 获取渲染目标视图的 CPU 描述符句柄。返回的句柄用于绑定 RTV 到渲染管线命令列表。 ## 返回值 `D3D12_CPU_DESCRIPTOR_HANDLE` - CPU 描述符句柄 ## 复杂度 O(1) ## 示例 ```cpp D3D12_CPU_DESCRIPTOR_HANDLE handle = rtv.GetCPUDescriptorHandle(); commandList->OMSetRenderTargets(1, &handle, FALSE, nullptr); ``` ## 相关文档 - [D3D12RenderTargetView](render-target-view.md) - 类总览 - [OMSetRenderTargets (D3D12)](https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-omsetrendertargets)