Files
XCSDD/docs/api/rhi/command-list/set-vertex-buffers.md

28 lines
696 B
Markdown
Raw Normal View History

# RHICommandList::SetVertexBuffers
```cpp
virtual void SetVertexBuffers(uint32_t startSlot, uint32_t count, const uint64_t* buffers, const uint64_t* offsets, const uint32_t* strides) = 0;
```
设置多个顶点缓冲区。
**参数:**
- `startSlot` - 起始槽位
- `count` - 缓冲区数量
- `buffers` - 缓冲区指针数组
- `offsets` - 偏移量数组
- `strides` - 步长数组
**示例:**
```cpp
uint64_t buffers[2] = {(uint64_t)vb1, (uint64_t)vb2};
uint64_t offsets[2] = {0, 0};
uint32_t strides[2] = {sizeof(Vertex), sizeof(Vertex)};
cmdList->SetVertexBuffers(0, 2, buffers, offsets, strides);
```
## 相关文档
- [RHICommandList 总览](command-list.md) - 返回类总览