From aa9b91342ec0a5bb429c251125df58e9105dc55a Mon Sep 17 00:00:00 2001 From: ssdfasd <2156608475@qq.com> Date: Mon, 23 Mar 2026 18:50:48 +0800 Subject: [PATCH] Revert README RenderDocCapture API detail - keep it simple --- README.md | 43 ++----------------------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 84f6dbf2..7b9fc44e 100644 --- a/README.md +++ b/README.md @@ -317,45 +317,7 @@ build/tests/threading/Debug/xcengine_threading_tests.exe - **ConsoleLogSink**: 控制台日志输出 - **FileLogSink**: 文件日志输出 - **Profiler**: 性能分析工具 -- **RenderDocCapture**: RenderDoc 帧捕获集成,支持动态加载 renderdoc.dll 进行 GPU 帧调试 - -#### RenderDocCapture API - -支持 D3D12 和 OpenGL 的帧捕获调试: - -```cpp -// 初始化(设备创建之前调用) -RenderDocCapture::Get().Initialize(nullptr, hwnd); -RenderDocCapture::Get().SetDevice(device); // D3D12: ID3D12Device*, OpenGL: HGLRC - -// 捕获配置 -RenderDocCapture::Get().SetCaptureFilePath(".\\capture"); -RenderDocCapture::Get().SetCaptureComments("Comment"); -RenderDocCapture::Get().SetCaptureOptionU32(option, value); - -// 帧捕获 -bool BeginCapture(const char* title = nullptr); // 返回 bool -bool EndCapture(); // 返回 bool -void TriggerCapture(); // 捕获下一帧 -bool IsCapturing() const; -uint32_t GetNumCaptures() const; - -// 获取捕获信息 -struct RenderDocCaptureInfo { - char filename[256]; - uint32_t length; - uint64_t timestamp; -}; -bool GetCapture(uint32_t index, RenderDocCaptureInfo* info); - -// 打开 RenderDoc replay UI -bool LaunchReplayUI(uint32_t connect = 1, const char* cmdline = nullptr); -``` - -> **注意**: -> - OpenGL 后端需要传递 `HGLRC`(OpenGL 上下文)作为 device,不是 `HDC` -> - `renderdoc.dll` 需放置于 `engine/third_party/renderdoc/renderdoc.dll` -> - D3D12 和 OpenGL 均已验证可正常捕获 +- **RenderDocCapture**: RenderDoc 帧捕获集成,支持 D3D12/OpenGL GPU 调试 ### Memory(内存管理) @@ -459,11 +421,10 @@ mvs(Multiple Version Samples)展示游戏引擎的各类功能。所有示 ### RenderDoc -D3D12 / OpenGL + RenderDoc 集成示例,展示如何使用 RenderDoc API 进行 GPU 帧捕获和调试: +D3D12 + RenderDoc 集成示例,展示如何使用 RenderDoc API 进行 GPU 帧捕获和调试: - 动态加载 renderdoc.dll - 帧捕获 API(BeginCapture/EndCapture/TriggerCapture) - 捕获文件路径和注释设置 -- 支持 D3D12 和 OpenGL 双后端 > 注意:renderdoc.dll 需单独放置于 `engine/third_party/renderdoc/renderdoc.dll`