Files
XCEngine/docs/api/rhi/command-list/set-primitive-topology.md
2026-03-20 02:35:45 +08:00

30 lines
697 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# RHICommandList::SetPrimitiveTopology
```cpp
virtual void SetPrimitiveTopology(PrimitiveTopology topology) = 0;
```
设置图元拓扑类型。拓扑类型决定了顶点如何被解释为几何图元,如点列表、线段列表、三角形列表等。
**参数:**
- `topology` - 图元拓扑类型枚举值PointList、LineList、TriangleList 等)
**返回:** `void`
**异常:**
**线程安全:**
**复杂度:** O(1)
**示例:**
```cpp
cmdList->SetPrimitiveTopology(PrimitiveTopology::TriangleList);
```
## 相关文档
- [RHICommandList 总览](command-list.md) - 返回类总览
- [Draw](draw.md) - 绘制
- [DrawIndexed](draw-indexed.md) - 索引绘制