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

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