Igor Igor - 1 year ago 120
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.

Answer Source

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).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download