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:
28
docs/api/rhi/opengl/vertex-array/add-vertex-buffer.md
Normal file
28
docs/api/rhi/opengl/vertex-array/add-vertex-buffer.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# OpenGLVertexArray::AddVertexBuffer
|
||||
|
||||
```cpp
|
||||
void AddVertexBuffer(unsigned int buffer, const VertexAttribute& attribute)
|
||||
```
|
||||
|
||||
添加顶点缓冲区并指定顶点属性。
|
||||
|
||||
**参数:**
|
||||
- `buffer` - OpenGL 缓冲区对象 ID
|
||||
- `attribute` - 顶点属性描述结构体
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
VertexAttribute attr;
|
||||
attr.index = 0;
|
||||
attr.count = 3;
|
||||
attr.type = GL_FLOAT;
|
||||
attr.normalized = GL_FALSE;
|
||||
attr.stride = sizeof(Vertex);
|
||||
attr.offset = 0;
|
||||
vao.AddVertexBuffer(vbo, attr);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLVertexArray](vertex-array.md) - 返回类总览
|
||||
20
docs/api/rhi/opengl/vertex-array/get-id.md
Normal file
20
docs/api/rhi/opengl/vertex-array/get-id.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# OpenGLVertexArray::GetID
|
||||
|
||||
```cpp
|
||||
unsigned int GetID() const
|
||||
```
|
||||
|
||||
获取 OpenGL 顶点数组对象 ID。
|
||||
|
||||
**返回:** `unsigned int` - VAO ID
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
unsigned int vaoID = vao.GetID();
|
||||
glBindVertexArray(vaoID);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLVertexArray](vertex-array.md) - 返回类总览
|
||||
19
docs/api/rhi/opengl/vertex-array/get-index-buffer.md
Normal file
19
docs/api/rhi/opengl/vertex-array/get-index-buffer.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# OpenGLVertexArray::GetIndexBuffer
|
||||
|
||||
```cpp
|
||||
unsigned int GetIndexBuffer() const
|
||||
```
|
||||
|
||||
获取索引缓冲区 ID。
|
||||
|
||||
**返回:** `unsigned int` - 索引缓冲区 ID
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
unsigned int ibo = vao.GetIndexBuffer();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLVertexArray](vertex-array.md) - 返回类总览
|
||||
20
docs/api/rhi/opengl/vertex-array/get-index-count.md
Normal file
20
docs/api/rhi/opengl/vertex-array/get-index-count.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# OpenGLVertexArray::GetIndexCount
|
||||
|
||||
```cpp
|
||||
unsigned int GetIndexCount() const
|
||||
```
|
||||
|
||||
获取索引数量。
|
||||
|
||||
**返回:** `unsigned int` - 索引数量
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
unsigned int count = vao.GetIndexCount();
|
||||
glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_INT, 0);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLVertexArray](vertex-array.md) - 返回类总览
|
||||
21
docs/api/rhi/opengl/vertex-array/set-index-buffer.md
Normal file
21
docs/api/rhi/opengl/vertex-array/set-index-buffer.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# OpenGLVertexArray::SetIndexBuffer
|
||||
|
||||
```cpp
|
||||
void SetIndexBuffer(unsigned int buffer, unsigned int type)
|
||||
```
|
||||
|
||||
设置索引缓冲区。
|
||||
|
||||
**参数:**
|
||||
- `buffer` - OpenGL 缓冲区对象 ID
|
||||
- `type` - 索引数据类型(GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
vao.SetIndexBuffer(ibo, GL_UNSIGNED_INT);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLVertexArray](vertex-array.md) - 返回类总览
|
||||
23
docs/api/rhi/opengl/vertex-array/vertex-array.md
Normal file
23
docs/api/rhi/opengl/vertex-array/vertex-array.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# OpenGLVertexArray
|
||||
|
||||
**命名空间**: `XCEngine::RHI`
|
||||
|
||||
**描述**: OpenGL 顶点数组对象 (VAO) 封装。
|
||||
|
||||
## 公共方法
|
||||
|
||||
| 方法 | 描述 |
|
||||
|------|------|
|
||||
| [`Initialize`](../../../threading/task-system/initialize.md) | 初始化顶点数组 |
|
||||
| [`AddVertexBuffer`](add-vertex-buffer.md) | 添加顶点缓冲 |
|
||||
| [`SetIndexBuffer`](set-index-buffer.md) | 设置索引缓冲 |
|
||||
| [`Shutdown`](../../../threading/task-system/shutdown.md) | 关闭顶点数组 |
|
||||
| [`Bind`](../../shader/bind.md) | 绑定顶点数组 |
|
||||
| [`Unbind`](../../shader/unbind.md) | 解绑顶点数组 |
|
||||
| [`GetID`](get-id.md) | 获取 OpenGL VAO ID |
|
||||
| [`GetIndexBuffer`](get-index-buffer.md) | 获取索引缓冲 |
|
||||
| [`GetIndexCount`](get-index-count.md) | 获取索引数量 |
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGL 后端总览](../overview.md)
|
||||
Reference in New Issue
Block a user