Commit 89c5239e02

89c5239e0248e12f92dd6c0718df149cb2b35f20

parent: 216be23aa7

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-20 08:43 UTC

Say that render waits for the previous frame

Ref #6

Layout: unified · split

Packages/FoldKit/Sources/Renderer/PaperRenderer.swift +2 −1
@@ -81,7 +81,8 @@ public final class PaperRenderer {
8181
8282 /// Draws `mesh` with its vertices at `positions` into `target`, cleared to `background`.
8383 /// 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.
8586 public func render(positions: [SIMD3<Double>], mesh: RenderMesh, clusters: [CoplanarCluster], camera: Camera,
8687 faceColours: [SIMD4<Float>]? = nil, into target: MTLTexture) throws {
8788 let (vertices, ranges) = groupedVertices(positions: positions, mesh: mesh)