pub struct GpuDraw<'a> {
pub primitive_id: PrimitiveId,
pub node_id: NodeId,
pub material_id: Option<MaterialId>,
pub evaluated_material: Option<&'a EvaluatedMaterial>,
pub skin_id: Option<SkinId>,
pub primitive: &'a RenderPrimitive,
pub world_matrix: Mat4,
pub morph_weights: &'a [f32],
pub joint_matrices: &'a [Mat4],
/* private fields */
}Expand description
One GPU draw with stable asset identifiers and frame-local values.
Fields§
§primitive_id: PrimitiveIdStable identifier of the source primitive.
node_id: NodeIdStable identifier of the node that instantiates the primitive.
material_id: Option<MaterialId>Stable identifier of the primitive material, if present.
evaluated_material: Option<&'a EvaluatedMaterial>Dynamic material values matching material_id, when the draw has one.
skin_id: Option<SkinId>Stable identifier of the skin used by the draw, if present.
primitive: &'a RenderPrimitiveImmutable geometry and attribute data for the draw.
world_matrix: Mat4Current world transform of the primitive node.
Apply this matrix to unskinned primitives. Self::joint_matrices
already produce world-space output for skinned primitives, so applying
both would transform those vertices twice.
morph_weights: &'a [f32]Current morph weights in the order of RenderPrimitive::morph_targets.
joint_matrices: &'a [Mat4]Current world-space joint matrices in the selected crate::Skin joint order.
The slice is empty for an unskinned draw. A shader indexes it through
every consecutive JOINTS_n / WEIGHTS_n set on Self::primitive.