- 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
30 lines
516 B
Markdown
30 lines
516 B
Markdown
# RHIBuffer::SetData
|
|
|
|
```cpp
|
|
virtual void SetData(const void* data, size_t size, size_t offset = 0) = 0;
|
|
```
|
|
|
|
设置缓冲区数据。
|
|
|
|
**参数:**
|
|
- `data` - 源数据指针
|
|
- `size` - 数据大小(字节)
|
|
- `offset` - 缓冲区内的偏移量
|
|
|
|
**复杂度:** O(n)
|
|
|
|
**示例:**
|
|
|
|
```cpp
|
|
Vertex vertices[] = {
|
|
{0.0f, 0.5f, 0.0f},
|
|
{0.5f, -0.5f, 0.0f},
|
|
{-0.5f, -0.5f, 0.0f}
|
|
};
|
|
buffer->SetData(vertices, sizeof(vertices), 0);
|
|
```
|
|
|
|
## 相关文档
|
|
|
|
- [RHIBuffer 总览](buffer.md) - 返回类总览
|