pub struct MeshUpload<'a> {
pub label: &'a str,
pub vertices: &'a [u8],
pub indices: &'a [u32],
pub uv_range: UvRange,
pub flags: u32,
}Expand description
One mesh as a caller hands it to MeshPool::upload.
A description rather than six positional arguments, on
MeshPoolDesc’s terms: three of the five are slices whose order a caller
has no way to check at the call site, and vertices and indices swapped
is a mesh that uploads and draws nothing.
Fields§
§label: &'a strDebug name for the staging buffer and the command buffer this upload records into, so a capture says which mesh a copy belongs to.
vertices: &'a [u8]VERTEX_STRIDE-strided vertex data — one
MeshVertex::to_bytes record each, interleaved, which is not how
the pool stores them: MeshPool::upload is where the two streams are
separated, so a caller describes geometry once and the position region
stays contiguous for the passes that read nothing else.
indices: &'a [u32]Triangle indices, mesh-relative: the base vertex reaches the GPU beside them rather than inside them, so a mesh’s bytes never depend on where in the pool it landed. The module docs say by which route.
uv_range: UvRangeThe pair every UV lane in vertices was quantised against, on its way
to MeshRange::uv_range and the mesh table.
flags: u32The mesh’s own bits, on their way to MeshRange::flags — today only
GpuMesh::MESH_AUTHORED_TANGENTS.