docs: rebuild Debug API content
This commit is contained in:
@@ -1,31 +1,34 @@
|
||||
# RenderDocCapture::SetWindow
|
||||
|
||||
设置相关状态或配置。
|
||||
更新当前用于抓帧的窗口句柄。
|
||||
|
||||
```cpp
|
||||
void SetWindow(void* window);
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Debug/RenderDocCapture.h`,当前页面用于固定 `RenderDocCapture` 类目录下的方法级 canonical 路径。
|
||||
## 行为说明
|
||||
|
||||
**参数:**
|
||||
- `window` - 参数语义详见头文件声明。
|
||||
当前实现只是把 `window` 原样写入内部成员 `m_window`,不做任何合法性检查。之后 [BeginCapture](BeginCapture.md) 与 [TriggerCapture](TriggerCapture.md) 可能会把它转换为 `HWND` 并尝试设置前台窗口与焦点。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
## 参数
|
||||
|
||||
**示例:**
|
||||
- `window` - 目标窗口指针;在 Windows 平台上通常是 `HWND`。
|
||||
|
||||
## 返回值
|
||||
|
||||
- 无。
|
||||
|
||||
## 线程语义
|
||||
|
||||
- 建议在窗口所属线程或主线程设置。
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Debug/RenderDocCapture.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Debug::RenderDocCapture object;
|
||||
// 根据上下文补齐参数后调用 RenderDocCapture::SetWindow(...)。
|
||||
(void)object;
|
||||
}
|
||||
XCEngine::Debug::RenderDocCapture::Get().SetWindow(hwnd);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](RenderDocCapture.md)
|
||||
- [返回模块目录](../Debug.md)
|
||||
- [返回类型总览](RenderDocCapture.md)
|
||||
- [SetDevice](SetDevice.md)
|
||||
|
||||
Reference in New Issue
Block a user