uploadGeometry method
Uploads geometry that will outlive the frame.
Every mesh in the engine comes through here, plus the two buffers the
renderer keeps: the full-screen triangle and the identity index sequence
the debug overlay draws through. Per-frame geometry does not — see
PassEncoder.bindVertexData.
usage is required and cannot be defaulted; see GeometryUsage for the
backend that binds a buffer to its target permanently.
Implementation
@override
GeometryBuffer uploadGeometry(ByteData bytes, GeometryUsage usage) => guard(
'a ${bytes.lengthInBytes}-byte ${usage.name} buffer',
() => webgpuUploadGeometry(gpuDevice, _buffers, bytes, usage),
);