Skip to main content

SequenceRenderer

Struct SequenceRenderer 

Source
pub struct SequenceRenderer<D: Device> { /* private fields */ }
Expand description

A bounded sequence pipeline for one engine/backend type.

Submissions preserve temporal history and do not wait for readback. poll resolves only a completed oldest frame, preserving presentation order.

Implementations§

Source§

impl<D: Device> SequenceRenderer<D>

Source

pub fn submit( &mut self, engine: &mut Engine<D>, scene: &Scene, camera: &Camera, timestamp: u64, ) -> Result<FrameTicket, RenderError>

Submits one frame without waiting for GPU readback.

§Errors

Returns backpressure at the configured depth and rejects non-monotonic timestamps.

Source

pub fn poll( &mut self, engine: &mut Engine<D>, ) -> Result<Option<SequenceFrame>, RenderError>

Resolves the oldest frame only when its tracked submission has completed.

§Errors

Returns device loss or image-layout failures.

Source

pub fn finish( self, engine: &mut Engine<D>, ) -> Result<Vec<SequenceFrame>, RenderError>

Drains every outstanding frame in submission order.

§Errors

Returns the first device or image-layout failure.

Source

pub fn pending(&self) -> usize

Number of submitted frames still owning readback buffers.

Trait Implementations§

Source§

impl<D: Device> Debug for SequenceRenderer<D>

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<D> Freeze for SequenceRenderer<D>
where VecDeque<PendingSequence<D>>: Freeze,

§

impl<D> RefUnwindSafe for SequenceRenderer<D>
where VecDeque<PendingSequence<D>>: RefUnwindSafe,

§

impl<D> Send for SequenceRenderer<D>
where VecDeque<PendingSequence<D>>: Send,

§

impl<D> Sync for SequenceRenderer<D>
where VecDeque<PendingSequence<D>>: Sync,

§

impl<D> Unpin for SequenceRenderer<D>
where VecDeque<PendingSequence<D>>: Unpin,

§

impl<D> UnsafeUnpin for SequenceRenderer<D>
where VecDeque<PendingSequence<D>>: UnsafeUnpin,

§

impl<D> UnwindSafe for SequenceRenderer<D>
where VecDeque<PendingSequence<D>>: UnwindSafe,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.