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

OwnedFrame

Struct OwnedFrame 

Source
pub struct OwnedFrame { /* private fields */ }
Expand description

A frame between begin_frame and show_frame that owns a reference to its sender, from RenderSender::begin_owned_frame. Dropping it without OwnedFrame::show releases the frame info without presenting.

Implementations§

Source§

impl OwnedFrame

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 (qar_render_sender_frame_vulkan): views, image records and the semaphore to signal, plus the write-back that must happen before OwnedFrame::show. The borrow keeps the library’s frame pointer valid: no other frame_vulkan call can happen on this sender while it lives. Image records are snapshots; re-read them every frame.

Source

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

The shared D3D11 textures of this frame, the views laid out on them and, when the sender was created with acquire_keyed_mutex_sync false, their keyed mutexes and keys (qar_render_sender_frame_d3d11). Render into each view’s rectangle before OwnedFrame::show; the borrow ends before show can consume the frame, so the textures it lends cannot be used past the cycle. Read it every frame. Fails for a sender not created for D3D11.

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 Debug for OwnedFrame

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Drop for OwnedFrame

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. 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, !>

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.