Skip to main content

RenderSnapshot

Struct RenderSnapshot 

Source
pub struct RenderSnapshot {
    pub frame: FrameScalars,
    pub ui: UiIntents,
    pub ops: RenderOps,
    pub models: Vec<(u32, [[f32; 4]; 4])>,
    pub skinned_models: Vec<(u32, [[f32; 4]; 4])>,
    pub poses: SpanBuffer<[[f32; 4]; 4]>,
    pub morphs: SpanBuffer<f32>,
    pub text_calls: Vec<TextDrawCall>,
    pub lines: Vec<LineVertex>,
    pub scene_ops: Vec<SceneOp>,
}
Expand description

Everything one frame’s draw consumes, extracted from world state.

Fields§

§frame: FrameScalars

Camera and frame-wide scalars.

§ui: UiIntents

Window-interaction intents.

§ops: RenderOps

Backend effects recorded by the simulation systems this tick (spawn slot ops, settings appliers, streaming uploads), replayed in record order before the frame’s draw.

§models: Vec<(u32, [[f32; 4]; 4])>

Changed static draw-slot model matrices, in push order (a slot pushed twice keeps both entries; the last write wins on the backend).

§skinned_models: Vec<(u32, [[f32; 4]; 4])>

Changed skinned-instance model matrices, in push order.

§poses: SpanBuffer<[[f32; 4]; 4]>

Updated skinned joint matrices, keyed by skinned instance index.

§morphs: SpanBuffer<f32>

Updated morph-target weights, keyed by skinned instance index.

§text_calls: Vec<TextDrawCall>

The frame’s overlay draw list (UI text + sprites), adopted whole from the overlay build. clear leaves it untouched: extraction replaces the list wholesale and hands the spent one back to the overlay build, so its buffers recycle instead of dropping here.

§lines: Vec<LineVertex>

Expanded world-space line ribbons for this frame’s camera.

§scene_ops: Vec<SceneOp>

Scene fade / visibility effects recorded this frame.

Implementations§

Source§

impl RenderSnapshot

Source

pub fn clear(&mut self)

Reset for a new frame’s extraction, keeping buffer capacity.

Trait Implementations§

Source§

impl Default for RenderSnapshot

Source§

fn default() -> RenderSnapshot

Returns the “default value” for a type. Read more

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, <T as TryFrom<U>>::Error>

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.