20 lines
835 B
Markdown
20 lines
835 B
Markdown
---
|
|
title: "Primitive Type"
|
|
date: 2021-01-27T15:32:11-08:00
|
|
weight: 6
|
|
---
|
|
|
|
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.
|
|
|
|
`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.
|