MoonWorks-docs/content/Graphics/Resources/GraphicsPipeline/PrimitiveType.md

20 lines
835 B
Markdown
Raw Normal View History

2021-01-27 23:45:15 +00:00
---
2021-01-28 21:17:40 +00:00
title: "Primitive Type"
2021-01-27 23:45:15 +00:00
date: 2021-01-27T15:32:11-08:00
2021-01-28 20:52:39 +00:00
weight: 6
2021-01-27 23:45:15 +00:00
---
2021-01-28 21:17:40 +00:00
A "primitive" is just a shape that can be interpreted from a stream of vertex data. So `PrimitiveType` determines how a stream of vertex information will be interpreted as shapes by the pipeline. There are 5 types of primitives that MoonWorks supports.
2021-01-27 23:45:15 +00:00
`PointList` will interpret the data as a list of points.
`LineList` will interpret the data as a list of lines.
`LineStrip` will interpet the data as a strip of lines.
`TriangleList` will interpret the data as a list of triangles.
`TriangleStrip` will interpret the data as a strip of triangles.
The primitive type you will use the most by far is `TriangleList` - the vast majority of 3D model exporters will give you vertex data in the form of a list of triangles. The others are mostly niche cases.