pub struct DrawBatch<'a> {
pub mesh: &'a Mesh,
pub material: &'a Material,
pub world: Mat4,
pub sprite: Option<Sprite>,
pub cell: Option<u64>,
}Expand description
Ein Draw-Batch: Geometrie + Material + Welttransform.
Batch-Granularitaet ist bewusst ein Mesh+Material-Paar; Instancing
(Tilemap-Zellen teilen sich ein Mesh) optimiert das Backend selbst.
Mit Some(sprite) wird das Mesh als Billboard-Ausschnitt unlit und
alpha-gemischt gezeichnet; material.base_color ist dann der Tint.
Fields§
§mesh: &'a Mesh§material: &'a Material§world: Mat4§sprite: Option<Sprite>Billboard-Ausschnitt; None = normale Mesh-Material-Pipeline.
cell: Option<u64>Stream-Zellen-Id: ist sie gesetzt, zeichnet das Backend den
Batch nur, wenn die Zelle ueber GfxBackend::upload_cell
bereits in die GPU-Residenz uebernommen wurde (M3c-Handoff).
None = klassische Route ueber das Mesh-Handle.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for DrawBatch<'a>
impl<'a> RefUnwindSafe for DrawBatch<'a>
impl<'a> Send for DrawBatch<'a>
impl<'a> Sync for DrawBatch<'a>
impl<'a> Unpin for DrawBatch<'a>
impl<'a> UnsafeUnpin for DrawBatch<'a>
impl<'a> UnwindSafe for DrawBatch<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more