docs: update RHI API docs
This commit is contained in:
31
docs/api/rhi/opengl/vertex-array/constructor.md
Normal file
31
docs/api/rhi/opengl/vertex-array/constructor.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# OpenGLVertexArray::OpenGLVertexArray
|
||||
|
||||
```cpp
|
||||
OpenGLVertexArray()
|
||||
```
|
||||
|
||||
默认构造函数。初始化所有成员变量为默认值。
|
||||
|
||||
**详细描述:**
|
||||
- `m_vao` = 0
|
||||
- `m_indexBuffer` = 0
|
||||
- `m_indexCount` = 0
|
||||
- `m_vertexBufferCount` = 0
|
||||
|
||||
不创建任何 OpenGL 资源,需调用 `Initialize()` 后才能使用。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
OpenGLVertexArray vao;
|
||||
// 此时 vao 未初始化,不能使用 Bind 等方法
|
||||
if (vao.Initialize()) {
|
||||
vao.Bind(); // 现在可以使用了
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [OpenGLVertexArray](vertex-array.md) - 返回类总览
|
||||
- [Initialize](initialize.md) - 初始化方法
|
||||
- [Shutdown](shutdown.md) - 关闭方法
|
||||
Reference in New Issue
Block a user