docs: update RHI API docs

This commit is contained in:
2026-03-20 02:35:45 +08:00
parent ea756c0177
commit 070b444f8f
501 changed files with 13493 additions and 2022 deletions

View File

@@ -6,15 +6,24 @@ unsigned int GetIndexCount() const
获取索引数量。
**返回** `unsigned int` - 索引数量
**详细描述**
返回 `m_indexCount` 成员的值。**注意**:当前实现中 `m_indexCount` 仅在构造函数中初始化为 0
`SetIndexBuffer` 不会更新此值。如需获取索引数量,需在调用 `SetIndexBuffer` 后手动维护或通过其他方式获取。
**返回:** `unsigned int` - 索引数量(当前实现中始终为 0需手动维护
**示例:**
```cpp
unsigned int count = vao.GetIndexCount();
glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_INT, 0);
// 注意:GetIndexCount() 总是返回 0
// 建议自行维护索引数量
unsigned int indexCount = /* 从外部获取或手动设置 */;
glDrawElements(GL_TRIANGLES, indexCount, GL_UNSIGNED_INT, 0);
```
**另见:**
- [SetIndexBuffer](set-index-buffer.md) - 设置索引缓冲(不更新 m_indexCount
## 相关文档
- [OpenGLVertexArray](vertex-array.md) - 返回类总览