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,21 @@
# OpenGLPipelineState::ApplyBlend
```cpp
void ApplyBlend();
```
应用混合状态到 OpenGL。
**线程安全:**
**示例:**
```cpp
pipelineState->SetBlendState(blendState);
pipelineState->ApplyBlend();
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [Apply](apply.md) - 应用所有状态

View File

@@ -0,0 +1,21 @@
# OpenGLPipelineState::ApplyDepthStencil
```cpp
void ApplyDepthStencil();
```
应用深度模板状态到 OpenGL。
**线程安全:**
**示例:**
```cpp
pipelineState->SetDepthStencilState(dsState);
pipelineState->ApplyDepthStencil();
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [Apply](apply.md) - 应用所有状态

View File

@@ -0,0 +1,21 @@
# OpenGLPipelineState::ApplyRasterizer
```cpp
void ApplyRasterizer();
```
应用光栅化状态到 OpenGL。
**线程安全:**
**示例:**
```cpp
pipelineState->SetRasterizerState(rsState);
pipelineState->ApplyRasterizer();
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [Apply](apply.md) - 应用所有状态

View File

@@ -0,0 +1,21 @@
# OpenGLPipelineState::ApplyScissor
```cpp
void ApplyScissor();
```
应用裁剪状态到 OpenGL。
**线程安全:**
**示例:**
```cpp
pipelineState->SetScissor(scissor);
pipelineState->ApplyScissor();
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [Apply](apply.md) - 应用所有状态

View File

@@ -0,0 +1,21 @@
# OpenGLPipelineState::ApplyViewport
```cpp
void ApplyViewport();
```
应用视口状态到 OpenGL。
**线程安全:**
**示例:**
```cpp
pipelineState->SetViewport(viewport);
pipelineState->ApplyViewport();
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [Apply](apply.md) - 应用所有状态

View File

@@ -0,0 +1,27 @@
# OpenGLPipelineState::Apply
```cpp
void Apply();
```
应用所有管线状态(深度模板、混合、光栅化、视口、裁剪)。
**线程安全:**
**示例:**
```cpp
pipelineState->SetDepthStencilState(dsState);
pipelineState->SetBlendState(blendState);
pipelineState->SetRasterizerState(rsState);
pipelineState->SetViewport(viewport);
pipelineState->SetScissor(scissor);
pipelineState->Apply();
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [ApplyDepthStencil](apply-depth-stencil.md) - 仅应用深度模板
- [ApplyBlend](apply-blend.md) - 仅应用混合
- [ApplyRasterizer](apply-rasterizer.md) - 仅应用光栅化

View File

@@ -0,0 +1,23 @@
# OpenGLPipelineState::AttachShader
```cpp
void AttachShader(unsigned int program);
```
附加 OpenGL 着色器程序到管线状态。
**参数:**
- `program` - OpenGL 着色器程序 ID
**线程安全:**
**示例:**
```cpp
pipelineState->AttachShader(shaderProgram);
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [DetachShader](detach-shader.md) - 分离着色器程序

View File

@@ -0,0 +1,20 @@
# OpenGLPipelineState::DetachShader
```cpp
void DetachShader();
```
从管线状态分离着色器程序。
**线程安全:**
**示例:**
```cpp
pipelineState->DetachShader();
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [AttachShader](attach-shader.md) - 附加着色器程序

View File

@@ -0,0 +1,25 @@
# OpenGLPipelineState::GetBlendState
```cpp
const OpenGLBlendState& GetBlendState() const;
```
获取当前混合状态。
**返回:** 混合状态结构体引用
**线程安全:**
**示例:**
```cpp
const auto& blendState = pipelineState->GetBlendState();
if (blendState.blendEnable) {
// blend is enabled
}
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [SetBlendState](set-blend-state.md) - 设置混合状态

View File

@@ -0,0 +1,25 @@
# OpenGLPipelineState::GetDepthStencilState
```cpp
const OpenGLDepthStencilState& GetDepthStencilState() const;
```
获取当前深度模板状态。
**返回:** 深度模板状态结构体引用
**线程安全:**
**示例:**
```cpp
const auto& dsState = pipelineState->GetDepthStencilState();
if (dsState.depthTestEnable) {
// depth test is enabled
}
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [SetDepthStencilState](set-depth-stencil-state.md) - 设置深度模板状态

View File

@@ -0,0 +1,25 @@
# OpenGLPipelineState::GetRasterizerState
```cpp
const OpenGLRasterizerState& GetRasterizerState() const;
```
获取当前光栅化状态。
**返回:** 光栅化状态结构体引用
**线程安全:**
**示例:**
```cpp
const auto& rsState = pipelineState->GetRasterizerState();
if (rsState.cullFaceEnable) {
// culling is enabled
}
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [SetRasterizerState](set-rasterizer-state.md) - 设置光栅化状态

View File

@@ -0,0 +1,39 @@
# OpenGLPipelineState
**命名空间**: `XCEngine::RHI`
**描述**: OpenGL 管线状态对象实现,继承自 `RHIPipelineState`
## 公共方法
| 方法 | 描述 |
|------|------|
| [`Shutdown`](../../../threading/task-system/shutdown.md) | 关闭管线状态 |
| [`Bind`](../../shader/bind.md) | 绑定管线状态 |
| [`Unbind`](../../shader/unbind.md) | 解绑管线状态 |
| [`GetNativeHandle`](../../buffer/get-native-handle.md) | 获取原生句柄 |
| [`GetType`](../../command-queue/get-type.md) | 获取管线类型 |
| [`SetDepthStencilState`](set-depth-stencil-state.md) | 设置深度模板状态 |
| [`SetBlendState`](set-blend-state.md) | 设置混合状态 |
| [`SetRasterizerState`](set-rasterizer-state.md) | 设置光栅化状态 |
| [`SetViewport`](set-viewport.md) | 设置视口 |
| [`SetScissor`](set-scissor.md) | 设置裁剪 |
| [`SetLogicalOperation`](set-logical-operation.md) | 设置逻辑操作 |
| [`Apply`](apply.md) | 应用管线状态 |
| [`ApplyDepthStencil`](apply-depth-stencil.md) | 应用深度模板状态 |
| [`ApplyBlend`](apply-blend.md) | 应用混合状态 |
| [`ApplyRasterizer`](apply-rasterizer.md) | 应用光栅化状态 |
| [`ApplyViewport`](apply-viewport.md) | 应用视口 |
| [`ApplyScissor`](apply-scissor.md) | 应用裁剪 |
| [`SetClearColor`](set-clear-color.md) | 设置清除颜色 |
| [`Clear`](../../command-list/clear.md) | 清除 |
| [`AttachShader`](attach-shader.md) | 附加着色器 |
| [`DetachShader`](detach-shader.md) | 分离着色器 |
| [`GetDepthStencilState`](get-depth-stencil-state.md) | 获取深度模板状态 |
| [`GetBlendState`](get-blend-state.md) | 获取混合状态 |
| [`GetRasterizerState`](get-rasterizer-state.md) | 获取光栅化状态 |
## 相关文档
- [OpenGL 后端总览](../overview.md)
- [RHIPipelineState](../../pipeline-state/pipeline-state.md) - 抽象管线状态接口

View File

@@ -0,0 +1,27 @@
# OpenGLPipelineState::SetBlendState
```cpp
void SetBlendState(const OpenGLBlendState& state);
```
设置混合状态。
**参数:**
- `state` - 混合状态结构体
**线程安全:**
**示例:**
```cpp
OpenGLBlendState blendState;
blendState.blendEnable = true;
blendState.srcBlend = BlendFactor::SrcAlpha;
blendState.dstBlend = BlendFactor::InvSrcAlpha;
pipelineState->SetBlendState(blendState);
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [GetBlendState](get-blend-state.md) - 获取混合状态

View File

@@ -0,0 +1,26 @@
# OpenGLPipelineState::SetClearColor
```cpp
void SetClearColor(float r, float g, float b, float a);
```
设置清除颜色值。
**参数:**
- `r` - 红色通道 (0.0 ~ 1.0)
- `g` - 绿色通道 (0.0 ~ 1.0)
- `b` - 蓝色通道 (0.0 ~ 1.0)
- `a` - Alpha 通道 (0.0 ~ 1.0)
**线程安全:**
**示例:**
```cpp
pipelineState->SetClearColor(0.1f, 0.1f, 0.1f, 1.0f);
pipelineState->Clear(GL_COLOR_BUFFER_BIT);
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览

View File

@@ -0,0 +1,27 @@
# OpenGLPipelineState::SetDepthStencilState
```cpp
void SetDepthStencilState(const OpenGLDepthStencilState& state);
```
设置深度模板状态。
**参数:**
- `state` - 深度模板状态结构体
**线程安全:**
**示例:**
```cpp
OpenGLDepthStencilState dsState;
dsState.depthTestEnable = true;
dsState.depthWriteEnable = true;
dsState.depthFunc = ComparisonFunc::Less;
pipelineState->SetDepthStencilState(dsState);
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [GetDepthStencilState](get-depth-stencil-state.md) - 获取深度模板状态

View File

@@ -0,0 +1,25 @@
# OpenGLPipelineState::SetLogicalOperation
```cpp
void SetLogicalOperation(const LogicalOperation& state);
```
设置逻辑操作状态。
**参数:**
- `state` - 逻辑操作状态结构体
**线程安全:**
**示例:**
```cpp
LogicalOperation op;
op.enable = false;
op.operation = 0;
pipelineState->SetLogicalOperation(op);
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览

View File

@@ -0,0 +1,27 @@
# OpenGLPipelineState::SetRasterizerState
```cpp
void SetRasterizerState(const OpenGLRasterizerState& state);
```
设置光栅化状态。
**参数:**
- `state` - 光栅化状态结构体
**线程安全:**
**示例:**
```cpp
OpenGLRasterizerState rsState;
rsState.cullFaceEnable = true;
rsState.cullFace = CullFace::Back;
rsState.frontFace = FrontFace::CounterClockwise;
pipelineState->SetRasterizerState(rsState);
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [GetRasterizerState](get-rasterizer-state.md) - 获取光栅化状态

View File

@@ -0,0 +1,29 @@
# OpenGLPipelineState::SetScissor
```cpp
void SetScissor(const ScissorState& state);
```
设置裁剪状态。
**参数:**
- `state` - 裁剪状态结构体
**线程安全:**
**示例:**
```cpp
ScissorState scissor;
scissor.enable = true;
scissor.x = 0;
scissor.y = 0;
scissor.width = 1920;
scissor.height = 1080;
pipelineState->SetScissor(scissor);
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [ApplyScissor](apply-scissor.md) - 应用裁剪状态

View File

@@ -0,0 +1,30 @@
# OpenGLPipelineState::SetViewport
```cpp
void SetViewport(const ViewportState& state);
```
设置视口状态。
**参数:**
- `state` - 视口状态结构体
**线程安全:**
**示例:**
```cpp
ViewportState viewport;
viewport.x = 0;
viewport.y = 0;
viewport.width = 1920;
viewport.height = 1080;
viewport.minDepth = 0.0f;
viewport.maxDepth = 1.0f;
pipelineState->SetViewport(viewport);
```
## 相关文档
- [OpenGLPipelineState 总览](pipeline-state.md) - 返回类总览
- [ApplyViewport](apply-viewport.md) - 应用视口状态