Files
XCEngine/docs/api/rhi/opengl/buffer/initialize.md
ssdfasd a669ec819d Fix RHI documentation discrepancies and add missing doc files
Fixed incorrect links in OpenGL documentation:
- Fixed wrong links to threading/task-system docs for Initialize/Shutdown methods
- Fixed wrong links to buffer docs for GetNativeHandle methods
- Fixed wrong links to shader docs for Bind/Unbind methods
- Fixed wrong links to command-list docs for Clear/Reset/Close methods
- Fixed wrong links to buffer/get-size.md for width/height methods

Added missing documentation files:
- OpenGL buffer: bind.md, unbind.md, get-type.md, initialize.md
- OpenGL fence: initialize.md, reset.md
- OpenGL swap-chain: get-size.md, initialize.md
- OpenGL render-target-view: initialize.md, shutdown.md, bind.md, unbind.md, clear.md, get-size.md
- OpenGL depth-stencil-view: initialize.md, shutdown.md, bind.md, unbind.md, get-size.md
- OpenGL command-list: clear.md

All links validated with fix_links.py - no broken references.
2026-03-19 00:54:54 +08:00

27 lines
560 B
Markdown

# OpenGLBuffer::Initialize
```cpp
bool Initialize(OpenGLBufferType type, size_t size, const void* data = nullptr, bool dynamic = false);
```
初始化 OpenGL 缓冲区。
**参数:**
- `type` - 缓冲区类型
- `size` - 缓冲区大小(字节)
- `data` - 初始数据指针(可选)
- `dynamic` - 是否为动态缓冲区
**返回:** 成功返回 true
**示例:**
```cpp
OpenGLBuffer buffer;
buffer.Initialize(OpenGLBufferType::Vertex, sizeof(vertices), vertices);
```
## 相关文档
- [OpenGLBuffer 总览](buffer.md) - 返回类总览