Files
XCEngine/docs/api/rhi/descriptor-pool/get-native-handle.md
2026-03-20 02:35:45 +08:00

35 lines
770 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# RHIDescriptorPool::GetNativeHandle
获取描述符池的原生 API 句柄。
## 方法签名
```cpp
virtual void* GetNativeHandle() = 0;
```
## 详细描述
返回描述符池在底层图形 APIDirectX 12/Vulkan中的原生句柄。用于与原生 API 进行交互。
## 参数列表
无参数。
## 返回值
`void*` - 原生 API 句柄指针。DirectX 12 下为 `ID3D12DescriptorHeap*`Vulkan 下为 `VkDescriptorPool`
## 示例代码
```cpp
void* handle = descriptorPool->GetNativeHandle();
// 使用原生句柄进行 API 特定操作
```
## 相关文档
- [RHIDescriptorPool 总览](descriptor-pool.md) - 返回类总览
- [GetDescriptorCount](get-descriptor-count.md) - 获取描述符数量
- [GetType](get-type.md) - 获取描述符类型