Igor Igor - 5 months ago 72
iOS Question

Drawing set of vectors using Metal

I need, using

, to create 3D model, which consist of thousands of vectors (lines). I know how to create model with triangles. But, can I do it by primitives, or only by triangles? Please, explaine or show example or class of Metal which I need to use for this task.


Metal has a line primitive that allows you to draw lines by specifying pairs of endpoints. You can specify that you want to draw lines with the first parameter (type) of any draw call. The caveat is that lines are always one pixel wide (i.e., there is no control over line width).