Skip to main content

DrawGeometryUpdate

Struct DrawGeometryUpdate 

Source
pub struct DrawGeometryUpdate {
    pub draw_idx: usize,
    pub vertices: Vec<Vertex>,
    pub indices: Vec<u16>,
    pub lod_alternates: Vec<(f32, Vec<u16>)>,
}
Expand description

One draw slot’s fresh geometry, supplied to RenderBackend::rebuild_static_geometry when an asset hot-reload changed its vertex / index count and the slot can no longer hold the new data in place. The backend rebuilds the entire shared vertex / index buffer; draws not named here keep their current geometry, copied byte-for- byte from the live buffers. indices are mesh-relative (0-based); the backend rebases them onto whatever new vertex region the draw lands in.

Fields§

§draw_idx: usize

The draw slot whose geometry is replaced.

§vertices: Vec<Vertex>

Replacement vertices.

§indices: Vec<u16>

Replacement indices, mesh-relative.

§lod_alternates: Vec<(f32, Vec<u16>)>

One slice per additional LOD, ordered mip 0 → mip N-1. Each is (switch_distance, mesh-relative indices). Empty for meshes declared lod_levels <= 1.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.