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:
2026-03-19 12:44:08 +08:00
parent e003fe6513
commit 58a83f445a
1012 changed files with 56880 additions and 22 deletions

View File

@@ -0,0 +1,23 @@
# OpenGLSwapChain::SetFramebufferSize
```cpp
void SetFramebufferSize(int width, int height);
```
设置帧缓冲区大小。
**参数:**
- `width` - 帧缓冲区宽度
- `height` - 帧缓冲区高度
**线程安全:**
**示例:**
```cpp
swapChain->SetFramebufferSize(1920, 1080);
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览

View File

@@ -0,0 +1,21 @@
# OpenGLSwapChain::GetWidth / GetHeight
```cpp
int GetWidth() const;
int GetHeight() const;
```
获取交换链的宽度和高度。
**返回:** 宽度/高度(像素)
**示例:**
```cpp
int width = swapChain->GetWidth();
int height = swapChain->GetHeight();
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览

View File

@@ -0,0 +1,22 @@
# OpenGLSwapChain::GetWindow
```cpp
GLFWwindow* GetWindow() const;
```
获取关联的 GLFW 窗口指针。
**返回:** GLFW 窗口指针
**线程安全:**
**示例:**
```cpp
GLFWwindow* window = swapChain->GetWindow();
glfwSetWindowTitle(window, "New Title");
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览

View File

@@ -0,0 +1,25 @@
# OpenGLSwapChain::Initialize (mode)
```cpp
bool Initialize(GLFWwindow* window, int width, int height, PresentMode mode = PresentMode::VSync);
```
使用指定显示模式初始化交换链。
**参数:**
- `window` - GLFW 窗口指针
- `width` - 交换链宽度
- `height` - 交换链高度
- `mode` - 呈现模式(默认 VSync
**返回:** 成功返回 `true`,失败返回 `false`
**示例:**
```cpp
swapChain->Initialize(window, 1920, 1080, PresentMode::VSync);
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览

View File

@@ -0,0 +1,24 @@
# OpenGLSwapChain::Initialize
```cpp
bool Initialize(GLFWwindow* window, bool vsync = true);
```
初始化 OpenGL 交换链。
**参数:**
- `window` - GLFW 窗口指针
- `vsync` - 是否启用垂直同步
**返回:** 成功返回 true
**示例:**
```cpp
OpenGLSwapChain swapChain;
swapChain.Initialize(window, true);
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览

View File

@@ -0,0 +1,24 @@
# OpenGLSwapChain::IsFullscreen
```cpp
bool IsFullscreen() const;
```
查询是否处于全屏模式。
**返回:** `true` 表示全屏模式,`false` 表示窗口模式
**线程安全:**
**示例:**
```cpp
if (swapChain->IsFullscreen()) {
// 全屏模式
}
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览
- [SetFullscreen](set-fullscreen.md) - 设置全屏模式

View File

@@ -0,0 +1,24 @@
# OpenGLSwapChain::IsVSync
```cpp
bool IsVSync() const;
```
查询垂直同步是否启用。
**返回:** `true` 表示启用垂直同步,`false` 表示禁用
**线程安全:**
**示例:**
```cpp
if (swapChain->IsVSync()) {
// 垂直同步已启用
}
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览
- [SetVSync](set-vsync.md) - 设置垂直同步

View File

@@ -0,0 +1,22 @@
# OpenGLSwapChain::PollEvents
```cpp
void PollEvents();
```
处理所有待处理的窗口事件。
**线程安全:**
**示例:**
```cpp
while (!swapChain->ShouldClose()) {
swapChain->PollEvents();
// 渲染逻辑
}
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览

View File

@@ -0,0 +1,24 @@
# OpenGLSwapChain::Present
```cpp
void Present(uint32_t syncInterval = 1, uint32_t flags = 0);
```
呈现渲染结果到屏幕。
**参数:**
- `syncInterval` - 垂直同步间隔0=立即1+=等待垂直同步)
- `flags` - 呈现标志
**线程安全:**
**示例:**
```cpp
swapChain->Present(1, 0);
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览
- [SwapBuffers](swap-buffers.md) - 直接交换缓冲区

View File

@@ -0,0 +1,23 @@
# OpenGLSwapChain::SetFullscreen
```cpp
void SetFullscreen(bool fullscreen);
```
设置全屏模式。
**参数:**
- `fullscreen` - 是否切换到全屏模式
**线程安全:**
**示例:**
```cpp
swapChain->SetFullscreen(true);
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览
- [IsFullscreen](is-fullscreen.md) - 查询全屏状态

View File

@@ -0,0 +1,23 @@
# OpenGLSwapChain::SetShouldClose
```cpp
void SetShouldClose(bool shouldClose);
```
设置窗口关闭标志。
**参数:**
- `shouldClose` - 是否应该关闭
**线程安全:**
**示例:**
```cpp
swapChain->SetShouldClose(true);
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览
- [ShouldClose](should-close.md) - 查询关闭标志

View File

@@ -0,0 +1,23 @@
# OpenGLSwapChain::SetVSync
```cpp
void SetVSync(bool enabled);
```
设置垂直同步开关。
**参数:**
- `enabled` - 是否启用垂直同步
**线程安全:**
**示例:**
```cpp
swapChain->SetVSync(true);
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览
- [IsVSync](is-vsync.md) - 查询垂直同步状态

View File

@@ -0,0 +1,25 @@
# OpenGLSwapChain::ShouldClose
```cpp
bool ShouldClose() const;
```
查询窗口是否应该关闭。
**返回:** `true` 表示应该关闭,`false` 表示继续运行
**线程安全:**
**示例:**
```cpp
while (!swapChain->ShouldClose()) {
swapChain->PollEvents();
// 渲染逻辑
}
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览
- [SetShouldClose](set-should-close.md) - 设置关闭标志

View File

@@ -0,0 +1,20 @@
# OpenGLSwapChain::SwapBuffers
```cpp
void SwapBuffers();
```
直接交换前后缓冲区。
**线程安全:**
**示例:**
```cpp
swapChain->SwapBuffers();
```
## 相关文档
- [OpenGLSwapChain 总览](swap-chain.md) - 返回类总览
- [Present](present.md) - 呈现(带垂直同步)

View File

@@ -0,0 +1,36 @@
# OpenGLSwapChain
**命名空间**: `XCEngine::RHI`
**描述**: OpenGL 交换链实现,继承自 `RHISwapChain`
## 公共方法
| 方法 | 描述 |
|------|------|
| [`Initialize`](initialize.md) | 初始化交换链 |
| [`InitializeMode`](initialize-mode.md) | 使用模式初始化 |
| [`Shutdown`](../../../threading/task-system/shutdown.md) | 关闭交换链 |
| [`Present`](present.md) | 呈现画面 |
| [`SwapBuffers`](swap-buffers.md) | 交换缓冲 |
| [`Resize`](../../swap-chain/resize.md) | 调整交换链大小 |
| [`SetVSync`](set-vsync.md) | 设置垂直同步 |
| [`IsVSync`](is-vsync.md) | 检查是否垂直同步 |
| [`SetFullscreen`](set-fullscreen.md) | 设置全屏模式 |
| [`IsFullscreen`](is-fullscreen.md) | 检查是否全屏 |
| [`ShouldClose`](should-close.md) | 检查是否应关闭 |
| [`SetShouldClose`](set-should-close.md) | 设置关闭标志 |
| [`PollEvents`](poll-events.md) | 处理窗口事件 |
| [`GetCurrentBackBufferIndex`](../../swap-chain/get-current-back-buffer-index.md) | 获取当前后台缓冲区索引 |
| [`GetCurrentBackBuffer`](../../swap-chain/get-current-back-buffer.md) | 获取当前后台缓冲区 |
| [`GetWidth`](get-size.md) | 获取宽度 |
| [`GetHeight`](get-size.md) | 获取高度 |
| [`GetFramebufferWidth`](get-framebuffer-size.md) | 获取帧缓冲宽度 |
| [`GetFramebufferHeight`](get-framebuffer-size.md) | 获取帧缓冲高度 |
| [`GetWindow`](get-window.md) | 获取窗口 |
| [`GetNativeHandle`](../../buffer/get-native-handle.md) | 获取原生句柄 |
## 相关文档
- [OpenGL 后端总览](../overview.md)
- [RHISwapChain](../../swap-chain/swap-chain.md) - 抽象交换链接口