Files
XCEngine/docs/api/XCEngine/Debug/RenderDocCapture/Get.md

36 lines
700 B
Markdown
Raw Normal View History

2026-03-26 16:45:24 +08:00
# RenderDocCapture::Get
2026-03-26 17:21:44 +08:00
获取进程级全局 `RenderDocCapture` 实例。
2026-03-26 16:45:24 +08:00
```cpp
static RenderDocCapture& Get();
```
2026-03-26 17:21:44 +08:00
## 行为说明
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
当前实现使用函数内静态对象保存单例。`Get()` 本身不会加载 RenderDoc也不会自动设置 `device``window`
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
## 参数
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
- 无。
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
## 返回值
- `RenderDocCapture&` - 全局 RenderDoc 封装对象引用。
## 线程语义
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
- 单例构造由 C++ 保证线程安全;后续抓帧 API 仍建议在主线程统一使用。
## 示例
```cpp
auto& capture = XCEngine::Debug::RenderDocCapture::Get();
capture.Initialize(nullptr, hwnd);
2026-03-26 16:45:24 +08:00
```
## 相关文档
2026-03-26 17:21:44 +08:00
- [返回类型总览](RenderDocCapture.md)
- [Initialize](Initialize.md)