flushInto static method
Rebuilds geometry from the accumulated line segments and clears the
buffer.
geometry is an updatable, non-indexed line geometry, as returned by
createGeometry. Its GPU buffers are reused frame to frame, so this is
the path for debug lines redrawn every frame; flushMesh allocates a
new geometry per call.
Implementation
static void flushInto(MeshGeometry geometry) {
geometry.rebuild(
positions: Float32List.fromList(_positions),
colors: Float32List.fromList(_colors),
);
clear();
}