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

1.2 KiB
Raw Blame History

RenderDocCapture::GetCapture

读取指定 capture 的元数据。

bool GetCapture(uint32_t index, RenderDocCaptureInfo* info) const;

行为说明

当前实现要求:

  • RenderDoc 已加载。
  • info 非空。

满足条件后,它会调用底层 RenderDoc API把结果写入 info->filenameinfo->lengthinfo->timestamp。如果底层返回值等于 1,则方法返回 true

注意当前包装层的一个实现细节:

  • RenderDocCaptureInfo::filename 是固定 256 字节数组。
  • XCEngine 直接把这块缓冲区传给 RenderDoc。

因此调用方不应假设超长路径总能被完整保留。

参数

  • index - capture 索引。
  • info - 输出缓冲区,成功时会被填充。

返回值

  • bool - true 表示成功读取该 capture 的元数据。

线程语义

  • 无显式同步;通常在抓帧结束后的主线程诊断阶段调用。

示例

using namespace XCEngine::Debug;

RenderDocCaptureInfo info{};
if (RenderDocCapture::Get().GetCapture(0, &info)) {
    Logger::Get().Info(LogCategory::RenderDoc, info.filename);
}

相关文档