docs: rebuild Debug API content

This commit is contained in:
2026-03-26 17:21:44 +08:00
parent 122495e581
commit 2e2316aa55
69 changed files with 2371 additions and 1092 deletions

View File

@@ -1,31 +1,40 @@
# RenderDocCapture::SetDevice
设置相关状态或配置
更新当前用于抓帧的图形设备指针
```cpp
void SetDevice(void* device);
```
该方法声明于 `XCEngine/Debug/RenderDocCapture.h`,当前页面用于固定 `RenderDocCapture` 类目录下的方法级 canonical 路径。
## 行为说明
**参数:**
- `device` - 参数语义详见头文件声明。
当前实现只是把 `device` 原样写入内部成员 `m_device`,不做类型检查、平台检查或合法性验证。
**返回:** `void` - 无返回值。
这个方法通常用于这样的流程:
**示例:**
1. 先在创建窗口后调用 [Initialize](Initialize.md)。
2. 图形后端初始化完成后,把真实设备指针补给 `RenderDocCapture`
## 参数
- `device` - 底层图形设备指针。
## 返回值
- 无。
## 线程语义
- 建议在图形设备创建线程中配置,并在抓帧前保持稳定。
## 示例
```cpp
#include <XCEngine/Debug/RenderDocCapture.h>
void Example() {
XCEngine::Debug::RenderDocCapture object;
// 根据上下文补齐参数后调用 RenderDocCapture::SetDevice(...)。
(void)object;
}
XCEngine::Debug::RenderDocCapture::Get().SetDevice(gDevice.GetDevice());
```
## 相关文档
- [返回类总览](RenderDocCapture.md)
- [返回模块目录](../Debug.md)
- [返回类总览](RenderDocCapture.md)
- [SetWindow](SetWindow.md)
- [Initialize](Initialize.md)