docs: update RHI API docs

This commit is contained in:
2026-03-20 02:35:45 +08:00
parent ea756c0177
commit 070b444f8f
501 changed files with 13493 additions and 2022 deletions

View File

@@ -4,8 +4,14 @@
**类型**: `class` (abstract)
**头文件**: `XCEngine/RHI/RHIPipelineLayout.h`
**描述**: GPU 渲染管线布局抽象接口,用于定义着色器资源的绑定布局。
## 概述
`RHIPipelineLayout` 是 RHIRendering Hardware Interface模块的核心类之一负责描述GPU渲染管线中着色器资源的绑定布局。它定义了管线中使用的常量缓冲区、纹理采样器和无序访问视图的数量和配置。作为抽象基类`RHIPipelineLayout` 需要由具体的图形API实现如 D3D12、OpenGL提供具体实现。
## 公共方法
| 方法 | 描述 |
@@ -14,7 +20,32 @@
| [`Shutdown`](shutdown.md) | 关闭并释放资源 |
| [`GetNativeHandle`](get-native-handle.md) | 获取原生句柄 |
## 使用示例
```cpp
#include "RHI/RHIPipelineLayout.h"
#include "RHI/RHIDevice.h"
// 创建设备后创建管线布局
RHIPipelineLayoutDesc layoutDesc;
layoutDesc.constantBufferCount = 2;
layoutDesc.textureCount = 4;
layoutDesc.samplerCount = 2;
layoutDesc.uavCount = 1;
RHIPipelineLayout* pipelineLayout = device->CreatePipelineLayout(layoutDesc);
if (pipelineLayout->Initialize(layoutDesc)) {
// 管线布局初始化成功
void* nativeHandle = pipelineLayout->GetNativeHandle();
// 使用原生句柄进行绑定...
pipelineLayout->Shutdown();
}
delete pipelineLayout;
```
## 相关文档
- [../rhi/rhi.md](../rhi.md) - RHI 模块总览
- [../rhi.md](../rhi.md) - RHI 模块总览
- [RHIDevice](../device/device.md) - 创建设备