uploadGeometry method

  1. @override
GeometryBuffer uploadGeometry(
  1. ByteData bytes,
  2. GeometryUsage usage
)
override

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) {
  uploads.add(usage);
  return _geometry(bytes);
}