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

@@ -4,12 +4,23 @@
virtual ResourceStates GetState() const = 0;
```
获取当前资源状态
获取缓冲区当前所处的资源状态。资源状态决定缓冲区可以用于哪些 GPU 操作
**返回:** 资源状态枚举值
**返回:** `ResourceStates` 枚举值
**线程安全:**
**复杂度:** O(1)
**示例:**
```cpp
ResourceStates state = buffer->GetState();
if (state == ResourceStates::VertexAndConstantBuffer) {
printf("Buffer is ready for vertex binding\n");
}
```
## 相关文档
- [RHIBuffer 总览](buffer.md) - 返回类总览