fix(rhi): Fix RHI abstraction layer API docs per api-skill.md template

- Rename texture/dtor.md to destructor.md per template spec
- Remove duplicate non-hyphenated fence docs (getnativehandle.md, issignaled.md, getcompletedvalue.md)
- Fix template field issues:
  - swap-chain, command-queue: 类型 now uses 'class (abstract)'
  - sampler: 头文件 now uses full path 'XCEngine/RHI/RHISampler.h'
  - types: 类型 fixed from 'structs' to 'struct'
  - enums: 类型 fixed from 'enums' to 'enum class'
- Fix include paths in command-queue and pipeline-layout code examples
- Create missing constructor/destructor docs for 11 classes:
  buffer, texture, shader, device, command-list, command-queue,
  fence, sampler, swap-chain, pipeline-state, pipeline-layout
- Update class overview pages to include constructor/destructor entries
This commit is contained in:
2026-03-22 03:07:41 +08:00
parent 11919aad2f
commit d83ed56177
40 changed files with 667 additions and 116 deletions

View File

@@ -0,0 +1,27 @@
# RHIPipelineLayout::RHIPipelineLayout
```cpp
RHIPipelineLayout() = default;
```
默认构造函数,创建空的 RHIPipelineLayout 对象。
**参数:**
**返回:**
**线程安全:**
**复杂度:** O(1)
**示例:**
```cpp
// 通过设备创建管线布局
RHIPipelineLayout* layout = device->CreatePipelineLayout(desc);
// layout 现在是一个有效的管线布局引用
```
## 相关文档
- [RHIPipelineLayout 总览](pipeline-layout.md) - 返回类总览

View File

@@ -0,0 +1,29 @@
# RHIPipelineLayout::~RHIPipelineLayout
```cpp
virtual ~RHIPipelineLayout() = default;
```
虚析构函数,确保派生类对象通过基类指针删除时能正确调用析构函数。
**参数:**
**返回:**
**线程安全:**
**复杂度:** O(1)
**示例:**
```cpp
// 通过基类指针销毁管线布局对象
RHIPipelineLayout* layout = device->CreatePipelineLayout(desc);
// ... 使用 layout ...
delete layout; // 自动调用派生类析构函数
```
## 相关文档
- [RHIPipelineLayout 总览](pipeline-layout.md) - 返回类总览
- [Shutdown](shutdown.md) - 关闭管线布局

View File

@@ -16,6 +16,8 @@
| 方法 | 描述 |
|------|------|
| [`RHIPipelineLayout`](constructor.md) | 默认构造函数 |
| [`~RHIPipelineLayout`](destructor.md) | 虚析构函数 |
| [`Initialize`](initialize.md) | 初始化管线布局 |
| [`Shutdown`](shutdown.md) | 关闭并释放资源 |
| [`GetNativeHandle`](get-native-handle.md) | 获取原生句柄 |
@@ -23,8 +25,8 @@
## 使用示例
```cpp
#include "RHI/RHIPipelineLayout.h"
#include "RHI/RHIDevice.h"
#include <XCEngine/RHI/RHIPipelineLayout.h>
#include <XCEngine/RHI/RHIDevice.h>
// 创建设备后创建管线布局
RHIPipelineLayoutDesc layoutDesc;