Commit 89c5239e02
Verified · cmc
Layout: unified · split
Packages/FoldKit/Sources/Renderer/PaperRenderer.swift +2 −1
| @@ -81,7 +81,8 @@ public final class PaperRenderer { | |||
| 81 | 81 | ||
| 82 | /// Draws `mesh` with its vertices at `positions` into `target`, cleared to `background`. | 82 | /// Draws `mesh` with its vertices at `positions` into `target`, cleared to `background`. |
| 83 | /// Faces in no cluster are not drawn. `faceColours`, when given, draws FOLD face i in | 83 | /// Faces in no cluster are not drawn. `faceColours`, when given, draws FOLD face i in |
| 84 | /// `faceColours[i]`, unlit, on both sides. Commits to `commandQueue` without waiting. | 84 | /// `faceColours[i]`, unlit, on both sides. Waits for the previous frame to finish, since it |
| 85 | /// reuses that frame's vertex buffer, then commits to `commandQueue` without waiting for this one. | ||
| 85 | public func render(positions: [SIMD3<Double>], mesh: RenderMesh, clusters: [CoplanarCluster], camera: Camera, | 86 | public func render(positions: [SIMD3<Double>], mesh: RenderMesh, clusters: [CoplanarCluster], camera: Camera, |
| 86 | faceColours: [SIMD4<Float>]? = nil, into target: MTLTexture) throws { | 87 | faceColours: [SIMD4<Float>]? = nil, into target: MTLTexture) throws { |
| 87 | let (vertices, ranges) = groupedVertices(positions: positions, mesh: mesh) | 88 | let (vertices, ranges) = groupedVertices(positions: positions, mesh: mesh) |