docs: update RHI API docs
This commit is contained in:
@@ -1,19 +1,41 @@
|
||||
# OpenGLFence::GetCurrentValue
|
||||
|
||||
```cpp
|
||||
uint64_t GetCurrentValue() const
|
||||
uint64_t GetCurrentValue() const;
|
||||
```
|
||||
|
||||
获取栅栏的当前值。
|
||||
|
||||
**返回:** `uint64_t` - 当前栅栏值
|
||||
## 详细描述
|
||||
|
||||
**示例:**
|
||||
返回 `m_fenceValue`,表示栅栏的最新值。每次调用 `Signal()` 时更新。
|
||||
|
||||
## 参数
|
||||
|
||||
无
|
||||
|
||||
## 返回值
|
||||
|
||||
| 类型 | 描述 |
|
||||
|------|------|
|
||||
| `uint64_t` | 当前栅栏值 |
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
uint64_t current = fence.GetCurrentValue();
|
||||
OpenGLFence fence;
|
||||
fence.Initialize(false);
|
||||
|
||||
uint64_t initial = fence.GetCurrentValue(); // 0
|
||||
|
||||
fence.Signal();
|
||||
uint64_t afterSignal = fence.GetCurrentValue(); // 1
|
||||
|
||||
fence.Signal(10);
|
||||
uint64_t afterValue = fence.GetCurrentValue(); // 10
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLFence](fence.md) - 返回类总览
|
||||
- [OpenGLFence 总览](fence.md) - 返回类总览
|
||||
- [GetCompletedValue](get-completed-value.md) - 获取已完成的栅栏值
|
||||
|
||||
Reference in New Issue
Block a user