Files
XCSDD/docs/api/rhi/opengl/buffer/initialize.md
ssdfasd 58a83f445a fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
2026-03-19 12:44:08 +08:00

560 B

OpenGLBuffer::Initialize

bool Initialize(OpenGLBufferType type, size_t size, const void* data = nullptr, bool dynamic = false);

初始化 OpenGL 缓冲区。

参数:

  • type - 缓冲区类型
  • size - 缓冲区大小(字节)
  • data - 初始数据指针(可选)
  • dynamic - 是否为动态缓冲区

返回: 成功返回 true

示例:

OpenGLBuffer buffer;
buffer.Initialize(OpenGLBufferType::Vertex, sizeof(vertices), vertices);

相关文档