Skip to main content
QAROS Rust API Dev (main) · versions: Dev (main) · Developer Guide

Frame

Struct Frame 

Source
pub struct Frame<'sender> { /* private fields */ }
Expand description

A frame between begin_frame and show_frame, borrowing its sender. Dropping it without Frame::show releases the frame info without presenting.

Implementations§

Source§

impl Frame<'_>

Source

pub fn view(&self, view_index: usize) -> Result<ViewPose>

Pose and field of view for view view_index. The C API offers no view count; use the number of views the sender was created with.

Source

pub fn cpu_frame(&mut self) -> Result<CpuFrame<'_>>

The CPU textures to write this frame’s pixels into (qar_render_sender_frame_cpu).

Source

pub fn vulkan_frame(&mut self) -> Result<VulkanFrame<'_>>

The sender-owned Vulkan images of this frame, with the write-back of layouts, queue family and fence; see OwnedFrame::vulkan_frame.

Source

pub fn d3d11_frame(&self) -> Result<D3D11Frame<'_>>

The shared D3D11 textures of this frame and the views on them; see OwnedFrame::d3d11_frame.

Source

pub fn show(self, params: &ShowParams) -> Result<()>

Presents the frame (qar_render_sender_show_frame) with the near and far planes actually used.

Trait Implementations§

Source§

impl<'sender> Debug for Frame<'sender>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'sender> !RefUnwindSafe for Frame<'sender>

§

impl<'sender> !Send for Frame<'sender>

§

impl<'sender> !Sync for Frame<'sender>

§

impl<'sender> !UnwindSafe for Frame<'sender>

§

impl<'sender> Freeze for Frame<'sender>

§

impl<'sender> Unpin for Frame<'sender>

§

impl<'sender> UnsafeUnpin for Frame<'sender>

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.