Render triangles as wireframes, instead of rendering lines
This commit is contained in:
parent
cb8afac46f
commit
6dc175c39d
1 changed files with 2 additions and 1 deletions
|
@ -191,7 +191,8 @@ public class Renderer: NSObject, MTKViewDelegate {
|
|||
encoder.label = "Marching Squares Render"
|
||||
encoder.setRenderPipelineState(pipeline)
|
||||
encoder.setVertexBytes(points, length: points.count * MemoryLayout<Vertex>.stride, index: 0)
|
||||
encoder.drawPrimitives(type: .line, vertexStart: 0, vertexCount: 6)
|
||||
encoder.setTriangleFillMode(.lines)
|
||||
encoder.drawPrimitives(type: .triangle, vertexStart: 0, vertexCount: 6)
|
||||
encoder.endEncoding()
|
||||
didEncode = true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue