2026-03-26 16:45:24 +08:00
|
|
|
# RenderDocCapture::EndCapture
|
|
|
|
|
|
2026-03-26 17:21:44 +08:00
|
|
|
结束当前正在进行的 RenderDoc 抓帧。
|
2026-03-26 16:45:24 +08:00
|
|
|
|
|
|
|
|
```cpp
|
|
|
|
|
bool EndCapture();
|
|
|
|
|
```
|
|
|
|
|
|
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
|
|
|
- RenderDoc 是否已加载。
|
|
|
|
|
- 当前是否确实处于抓帧状态。
|
2026-03-26 16:45:24 +08:00
|
|
|
|
2026-03-26 17:21:44 +08:00
|
|
|
如果任一条件不成立,会记录警告并返回 `false`。条件成立时会调用:
|
2026-03-26 16:45:24 +08:00
|
|
|
|
|
|
|
|
```cpp
|
2026-03-26 17:21:44 +08:00
|
|
|
m_api->EndFrameCapture(m_device, m_window);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 参数
|
|
|
|
|
|
|
|
|
|
- 无。
|
|
|
|
|
|
|
|
|
|
## 返回值
|
|
|
|
|
|
|
|
|
|
- `bool` - `true` 表示已发出结束抓帧请求;`false` 表示当前没有可结束的抓帧。
|
2026-03-26 16:45:24 +08:00
|
|
|
|
2026-03-26 17:21:44 +08:00
|
|
|
## 线程语义
|
|
|
|
|
|
|
|
|
|
- 应与 [BeginCapture](BeginCapture.md) 在同一渲染工作流中配对调用。
|
|
|
|
|
|
|
|
|
|
## 示例
|
|
|
|
|
|
|
|
|
|
```cpp
|
|
|
|
|
if (XCEngine::Debug::RenderDocCapture::Get().EndCapture()) {
|
|
|
|
|
XCEngine::Debug::Logger::Get().Info(
|
|
|
|
|
XCEngine::Debug::LogCategory::RenderDoc,
|
|
|
|
|
"Capture ended"
|
|
|
|
|
);
|
2026-03-26 16:45:24 +08:00
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 相关文档
|
|
|
|
|
|
2026-03-26 17:21:44 +08:00
|
|
|
- [返回类型总览](RenderDocCapture.md)
|
|
|
|
|
- [BeginCapture](BeginCapture.md)
|