fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
This commit is contained in:
35
docs/api/rhi/d3d12/swap-chain/get-back-buffer.md
Normal file
35
docs/api/rhi/d3d12/swap-chain/get-back-buffer.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# D3D12SwapChain::GetBackBuffer
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
D3D12Texture* GetBackBuffer(uint32_t index) const
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
获取指定索引的后台缓冲区。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `index` | `uint32_t` | 缓冲区索引 |
|
||||
|
||||
## 返回值
|
||||
|
||||
`D3D12Texture*` - 后台缓冲区纹理指针
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
D3D12Texture* buffer = swapChain->GetBackBuffer(0);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12SwapChain](swap-chain.md) - 类总览
|
||||
@@ -0,0 +1,30 @@
|
||||
# D3D12SwapChain::GetCurrentBackBufferIndex
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
uint32_t GetCurrentBackBufferIndex() const override
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
获取当前后台缓冲区的索引。
|
||||
|
||||
## 返回值
|
||||
|
||||
`uint32_t` - 当前后台缓冲区索引
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
uint32_t index = swapChain->GetCurrentBackBufferIndex();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12SwapChain](swap-chain.md) - 类总览
|
||||
- [D3D12SwapChain::GetCurrentBackBuffer](get-current-back-buffer.md) - 获取当前后台缓冲区
|
||||
30
docs/api/rhi/d3d12/swap-chain/get-current-back-buffer.md
Normal file
30
docs/api/rhi/d3d12/swap-chain/get-current-back-buffer.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# D3D12SwapChain::GetCurrentBackBuffer
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
RHITexture* GetCurrentBackBuffer() override
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
获取当前后台缓冲区纹理。
|
||||
|
||||
## 返回值
|
||||
|
||||
`RHITexture*` - 当前后台缓冲区纹理指针
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
RHITexture* backBuffer = swapChain->GetCurrentBackBuffer();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12SwapChain](swap-chain.md) - 类总览
|
||||
- [D3D12SwapChain::GetCurrentBackBufferIndex](get-current-back-buffer-index.md) - 获取当前缓冲区索引
|
||||
29
docs/api/rhi/d3d12/swap-chain/get-swap-chain.md
Normal file
29
docs/api/rhi/d3d12/swap-chain/get-swap-chain.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# D3D12SwapChain::GetSwapChain
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
IDXGISwapChain3* GetSwapChain() const
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
获取底层 `IDXGISwapChain3` 接口指针。
|
||||
|
||||
## 返回值
|
||||
|
||||
`IDXGISwapChain3*` - DXGI 交换链接口指针
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
IDXGISwapChain3* swapChain = d3d12SwapChain->GetSwapChain();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12SwapChain](swap-chain.md) - 类总览
|
||||
40
docs/api/rhi/d3d12/swap-chain/initialize-from-swapchain.md
Normal file
40
docs/api/rhi/d3d12/swap-chain/initialize-from-swapchain.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# D3D12SwapChain::Initialize
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
bool Initialize(IDXGIFactory4* factory, ID3D12CommandQueue* commandQueue, HWND windowHandle, uint32_t width, uint32_t height, uint32_t bufferCount = 2)
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
从工厂创建新的交换链。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `factory` | `IDXGIFactory4*` | DXGI 工厂指针 |
|
||||
| `commandQueue` | `ID3D12CommandQueue*` | 命令队列指针 |
|
||||
| `windowHandle` | `HWND` | 窗口句柄 |
|
||||
| `width` | `uint32_t` | 宽度 |
|
||||
| `height` | `uint32_t` | 高度 |
|
||||
| `bufferCount` | `uint32_t` | 缓冲区数量(默认 2) |
|
||||
|
||||
## 返回值
|
||||
|
||||
`bool` - 初始化是否成功
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(n) - 取决于缓冲区数量和大小
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
swapChain->Initialize(factory, commandQueue, hwnd, 1920, 1080, 2);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12SwapChain](swap-chain.md) - 类总览
|
||||
32
docs/api/rhi/d3d12/swap-chain/is-fullscreen.md
Normal file
32
docs/api/rhi/d3d12/swap-chain/is-fullscreen.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# D3D12SwapChain::IsFullscreen
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
bool IsFullscreen() const override
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
检查交换链是否处于全屏模式。
|
||||
|
||||
## 返回值
|
||||
|
||||
`bool` - 如果全屏则返回 `true`
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
if (swapChain->IsFullscreen()) {
|
||||
// 全屏模式
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12SwapChain](swap-chain.md) - 类总览
|
||||
- [D3D12SwapChain::SetFullscreen](set-fullscreen.md) - 设置全屏模式
|
||||
29
docs/api/rhi/d3d12/swap-chain/poll-events.md
Normal file
29
docs/api/rhi/d3d12/swap-chain/poll-events.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# D3D12SwapChain::PollEvents
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
void PollEvents() override
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
处理窗口消息队列中的事件。
|
||||
|
||||
## 返回值
|
||||
|
||||
无
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(n) - 取决于待处理事件数量
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
swapChain->PollEvents();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12SwapChain](swap-chain.md) - 类总览
|
||||
36
docs/api/rhi/d3d12/swap-chain/present.md
Normal file
36
docs/api/rhi/d3d12/swap-chain/present.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# D3D12SwapChain::Present
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
void Present(uint32_t syncInterval = 1, uint32_t flags = 0) override
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
呈现后台缓冲区内容到屏幕。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `syncInterval` | `uint32_t` | 垂直同步间隔(默认 1) |
|
||||
| `flags` | `uint32_t` | 呈现标志(默认 0) |
|
||||
|
||||
## 返回值
|
||||
|
||||
无
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
swapChain->Present(1, 0);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12SwapChain](swap-chain.md) - 类总览
|
||||
36
docs/api/rhi/d3d12/swap-chain/set-fullscreen.md
Normal file
36
docs/api/rhi/d3d12/swap-chain/set-fullscreen.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# D3D12SwapChain::SetFullscreen
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
void SetFullscreen(bool fullscreen) override
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
设置全屏模式。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `fullscreen` | `bool` | 是否全屏 |
|
||||
|
||||
## 返回值
|
||||
|
||||
无
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
swapChain->SetFullscreen(true);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12SwapChain](swap-chain.md) - 类总览
|
||||
- [D3D12SwapChain::IsFullscreen](is-fullscreen.md) - 检查全屏状态
|
||||
36
docs/api/rhi/d3d12/swap-chain/set-should-close.md
Normal file
36
docs/api/rhi/d3d12/swap-chain/set-should-close.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# D3D12SwapChain::SetShouldClose
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
void SetShouldClose(bool shouldClose) override
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
设置窗口关闭标志。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `shouldClose` | `bool` | 是否应该关闭 |
|
||||
|
||||
## 返回值
|
||||
|
||||
无
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
swapChain->SetShouldClose(true);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12SwapChain](swap-chain.md) - 类总览
|
||||
- [D3D12SwapChain::ShouldClose](should-close.md) - 检查关闭标志
|
||||
32
docs/api/rhi/d3d12/swap-chain/should-close.md
Normal file
32
docs/api/rhi/d3d12/swap-chain/should-close.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# D3D12SwapChain::ShouldClose
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
bool ShouldClose() const override
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
检查窗口是否应该关闭(如收到 WM_CLOSE 消息)。
|
||||
|
||||
## 返回值
|
||||
|
||||
`bool` - 如果应该关闭则返回 `true`
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
if (swapChain->ShouldClose()) {
|
||||
// 处理关闭
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12SwapChain](swap-chain.md) - 类总览
|
||||
- [D3D12SwapChain::SetShouldClose](set-should-close.md) - 设置关闭标志
|
||||
29
docs/api/rhi/d3d12/swap-chain/swap-chain.md
Normal file
29
docs/api/rhi/d3d12/swap-chain/swap-chain.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# D3D12SwapChain
|
||||
|
||||
**命名空间**: `XCEngine::RHI`
|
||||
|
||||
**描述**: DirectX 12 交换链的 D3D12 实现,继承自 `RHISwapChain`。
|
||||
|
||||
## 公共方法
|
||||
|
||||
| 方法 | 描述 |
|
||||
|------|------|
|
||||
| [`Initialize`](initialize-from-swapchain.md) | 从交换链初始化 |
|
||||
| [`Shutdown`](../../../threading/task-system/shutdown.md) | 关闭交换链 |
|
||||
| [`GetCurrentBackBufferIndex`](get-current-back-buffer-index.md) | 获取当前后台缓冲区索引 |
|
||||
| [`GetCurrentBackBuffer`](get-current-back-buffer.md) | 获取当前后台缓冲区 |
|
||||
| [`GetBackBuffer`](get-back-buffer.md) | 获取后台缓冲区 |
|
||||
| [`Present`](present.md) | 呈现画面 |
|
||||
| [`Resize`](../../swap-chain/resize.md) | 调整交换链大小 |
|
||||
| [`SetFullscreen`](set-fullscreen.md) | 设置全屏模式 |
|
||||
| [`IsFullscreen`](is-fullscreen.md) | 检查是否全屏 |
|
||||
| [`ShouldClose`](should-close.md) | 检查是否应关闭 |
|
||||
| [`SetShouldClose`](set-should-close.md) | 设置关闭标志 |
|
||||
| [`PollEvents`](poll-events.md) | 处理窗口事件 |
|
||||
| [`GetNativeHandle`](../../buffer/get-native-handle.md) | 获取原生句柄 |
|
||||
| [`GetSwapChain`](get-swap-chain.md) | 获取 D3D12 交换链 |
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12 后端总览](../../opengl/overview.md)
|
||||
- [RHISwapChain](../../swap-chain/swap-chain.md) - 抽象交换链接口
|
||||
Reference in New Issue
Block a user