docs: update RHI API docs
This commit is contained in:
@@ -2,23 +2,29 @@
|
||||
|
||||
**命名空间**: `XCEngine::RHI`
|
||||
|
||||
**类型**: `class`
|
||||
|
||||
**描述**: OpenGL 命令队列实现,继承自 `RHICommandQueue`。
|
||||
|
||||
## 概述
|
||||
|
||||
OpenGL 采用立即模式(Immediate Mode)渲染,与 D3D12 的命令列表模式不同。OpenGLCommandQueue 作为 RHI 抽象层接口实现,当前大多数方法为存根(stub)实现,实际渲染操作通过 OpenGL 命令直接执行。
|
||||
|
||||
## 公共方法
|
||||
|
||||
| 方法 | 描述 |
|
||||
|------|------|
|
||||
| [`Shutdown`](../../../threading/task-system/shutdown.md) | 关闭命令队列 |
|
||||
| [`Shutdown`](shutdown.md) | 关闭命令队列 |
|
||||
| [`ExecuteCommandLists`](execute-command-lists.md) | 执行命令列表 |
|
||||
| [`Signal`](signal.md) | 信号栅栏 |
|
||||
| [`Wait`](../../../threading/task-group/wait.md) | 等待栅栏 |
|
||||
| [`Signal`](signal.md) | 信号围栏 |
|
||||
| [`Wait`](wait.md) | 等待围栏 |
|
||||
| [`GetCompletedValue`](get-completed-value.md) | 获取完成值 |
|
||||
| [`WaitForIdle`](wait-for-idle.md) | 等待空闲 |
|
||||
| [`GetType`](../../command-queue/get-type.md) | 获取队列类型 |
|
||||
| [`GetType`](get-type.md) | 获取队列类型 |
|
||||
| [`GetTimestampFrequency`](get-timestamp-frequency.md) | 获取时间戳频率 |
|
||||
| [`GetNativeHandle`](../../buffer/get-native-handle.md) | 获取原生句柄 |
|
||||
| [`GetNativeHandle`](get-native-handle.md) | 获取原生句柄 |
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGL 后端总览](../overview.md)
|
||||
- [RHICommandQueue](../../command-queue/command-queue.md) - 抽象命令队列接口
|
||||
- [RHICommandQueue](../../command-queue/command-queue.md) - 抽象命令队列接口
|
||||
@@ -4,12 +4,14 @@
|
||||
void ExecuteCommandLists(uint32_t count, void** lists)
|
||||
```
|
||||
|
||||
执行命令列表。
|
||||
**详细描述**: 执行命令列表。OpenGL 采用立即模式,此方法当前为存根实现,实际渲染通过 OpenGL 命令直接执行。
|
||||
|
||||
**参数:**
|
||||
- `count` - 命令列表数量
|
||||
- `lists` - 命令列表指针数组
|
||||
|
||||
**返回值:** 无
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
@@ -19,4 +21,4 @@ commandQueue->ExecuteCommandLists(1, lists);
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回类总览
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回至类概览
|
||||
@@ -4,9 +4,9 @@
|
||||
uint64_t GetCompletedValue()
|
||||
```
|
||||
|
||||
获取已完成的值。
|
||||
**详细描述**: 获取围栏已完成的值。由于 OpenGLCommandQueue 为存根实现,此方法始终返回 0。
|
||||
|
||||
**返回:** 已完成的围栏值
|
||||
**返回值:** `uint64_t` - 已完成的围栏值,当前固定返回 0
|
||||
|
||||
**示例:**
|
||||
|
||||
@@ -16,4 +16,4 @@ uint64_t value = commandQueue->GetCompletedValue();
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回类总览
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回至类概览
|
||||
19
docs/api/rhi/opengl/command-queue/get-native-handle.md
Normal file
19
docs/api/rhi/opengl/command-queue/get-native-handle.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# OpenGLCommandQueue::GetNativeHandle
|
||||
|
||||
```cpp
|
||||
void* GetNativeHandle()
|
||||
```
|
||||
|
||||
**详细描述**: 获取原生句柄。OpenGLCommandQueue 当前为存根实现,因此始终返回 `nullptr`。
|
||||
|
||||
**返回值:** `void*` - 原生句柄指针,OpenGL 实现当前返回 `nullptr`
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
void* handle = commandQueue->GetNativeHandle();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回至类概览
|
||||
@@ -4,9 +4,9 @@
|
||||
uint64_t GetTimestampFrequency() const
|
||||
```
|
||||
|
||||
获取时间戳频率。
|
||||
**详细描述**: 获取时间戳频率。OpenGLCommandQueue 为存根实现,此方法始终返回 0,表示不支持时间戳查询。
|
||||
|
||||
**返回:** 时间戳频率(Hz)
|
||||
**返回值:** `uint64_t` - 时间戳频率(Hz),当前固定返回 0
|
||||
|
||||
**示例:**
|
||||
|
||||
@@ -16,4 +16,4 @@ uint64_t frequency = commandQueue->GetTimestampFrequency();
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回类总览
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回至类概览
|
||||
19
docs/api/rhi/opengl/command-queue/get-type.md
Normal file
19
docs/api/rhi/opengl/command-queue/get-type.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# OpenGLCommandQueue::GetType
|
||||
|
||||
```cpp
|
||||
CommandQueueType GetType() const
|
||||
```
|
||||
|
||||
**详细描述**: 获取命令队列类型。OpenGLCommandQueue 固定返回 `CommandQueueType::Direct`,表示直接命令队列。
|
||||
|
||||
**返回值:** `CommandQueueType` - 命令队列类型,当前固定返回 `CommandQueueType::Direct`
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
CommandQueueType type = commandQueue->GetType();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回至类概览
|
||||
13
docs/api/rhi/opengl/command-queue/shutdown.md
Normal file
13
docs/api/rhi/opengl/command-queue/shutdown.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# OpenGLCommandQueue::Shutdown
|
||||
|
||||
```cpp
|
||||
void Shutdown()
|
||||
```
|
||||
|
||||
**详细描述**: 关闭命令队列并释放相关资源。OpenGLCommandQueue 当前为存根实现,此方法为空实现。
|
||||
|
||||
**返回值:** 无
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回至类概览
|
||||
@@ -4,12 +4,14 @@
|
||||
void Signal(RHIFence* fence, uint64_t value)
|
||||
```
|
||||
|
||||
发送信号。
|
||||
**详细描述**: 向围栏发送信号。OpenGLCommandQueue 当前为存根实现,此方法为空实现。
|
||||
|
||||
**参数:**
|
||||
- `fence` - 围栏指针
|
||||
- `value` - 信号值
|
||||
|
||||
**返回值:** 无
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
@@ -18,4 +20,4 @@ commandQueue->Signal(fence, 1);
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回类总览
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回至类概览
|
||||
@@ -4,7 +4,9 @@
|
||||
void WaitForIdle()
|
||||
```
|
||||
|
||||
等待命令队列空闲。
|
||||
**详细描述**: 等待命令队列空闲。OpenGLCommandQueue 当前为存根实现,此方法为空实现。
|
||||
|
||||
**返回值:** 无
|
||||
|
||||
**示例:**
|
||||
|
||||
@@ -14,4 +16,4 @@ commandQueue->WaitForIdle();
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回类总览
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回至类概览
|
||||
23
docs/api/rhi/opengl/command-queue/wait.md
Normal file
23
docs/api/rhi/opengl/command-queue/wait.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# OpenGLCommandQueue::Wait
|
||||
|
||||
```cpp
|
||||
void Wait(RHIFence* fence, uint64_t value)
|
||||
```
|
||||
|
||||
**详细描述**: 等待围栏达到指定值。OpenGLCommandQueue 当前为存根实现,此方法为空实现。
|
||||
|
||||
**参数:**
|
||||
- `fence` - 围栏指针
|
||||
- `value` - 等待的围栏值
|
||||
|
||||
**返回值:** 无
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
commandQueue->Wait(fence, 1);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLCommandQueue](command-queue.md) - 返回至类概览
|
||||
Reference in New Issue
Block a user