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

VulkanFrame

Struct VulkanFrame 

Source
pub struct VulkanFrame<'frame> { /* private fields */ }
Expand description

The Vulkan frame of an open frame cycle, with write access to the state QAROS reads at show_frame. From crate::OwnedFrame::vulkan_frame or crate::Frame::vulkan_frame. Dereferences to VulkanFrameState.

Implementations§

Source§

impl<'frame> VulkanFrame<'frame>

Source

pub fn as_raw_mut(&mut self) -> *mut QarVideoFrameVulkan

The library’s QarVideoFrameVulkan record of this frame, for C helpers that take it (QuaternAR’s test extension writes textures and the write-back through it). Valid, and not to be used through another path, while this VulkanFrame is borrowed.

Source

pub fn set_image_state( &mut self, index: usize, layout: ImageLayout, queue_family_index: u32, ) -> Result<()>

Records the layout and owning queue family image index is left in by the work just submitted.

Source

pub fn release_to_external(&mut self, layout: ImageLayout)

Records every image as left in layout and released to VK_QUEUE_FAMILY_EXTERNAL, the cube’s write-back with SHOWN_LAYOUT.

Source

pub fn set_fence(&mut self, fence: Fence)

Writes the frame’s fence; the cube writes vk::Fence::null().

Methods from Deref<Target = VulkanFrameState<'frame>>§

Source

pub fn views(&self) -> Vec<VideoFrameView>

The frame’s views: which image, which rectangle, which eye, color or depth. QuaternAR’s cube finds views by eye and kind rather than by the order they were declared in; Self::view_index does that.

Source

pub fn view_index(&self, eye: Eye, kind: ViewKind) -> Option<usize>

Index of the first view showing kind for eye, the cube’s FindFrameView. The same index selects the view’s pose and field of view on the frame (crate::OwnedFrame::view).

Source

pub fn image_count(&self) -> usize

Number of sender-owned images in the frame.

Source

pub fn image(&self, index: usize) -> Option<VulkanImage>

The image a view’s texture_index names.

Source

pub fn images(&self) -> Vec<VulkanImage>

Every image of the frame, in texture_index order.

Source

pub fn semaphore(&self) -> Semaphore

The binary semaphore the frame’s last submission must signal. Owned by QAROS; VK_NULL_HANDLE when the frame has none.

Source

pub fn fence(&self) -> Fence

The fence currently in the frame record. The cube writes null before showing; what QAROS does with a non-null fence is not documented.

Trait Implementations§

Source§

impl<'frame> Debug for VulkanFrame<'frame>

Source§

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

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

impl<'frame> Deref for VulkanFrame<'frame>

Source§

type Target = VulkanFrameState<'frame>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

§

impl<'frame> !Send for VulkanFrame<'frame>

§

impl<'frame> !Sync for VulkanFrame<'frame>

§

impl<'frame> !UnwindSafe for VulkanFrame<'frame>

§

impl<'frame> Freeze for VulkanFrame<'frame>

§

impl<'frame> RefUnwindSafe for VulkanFrame<'frame>

§

impl<'frame> Unpin for VulkanFrame<'frame>

§

impl<'frame> UnsafeUnpin for VulkanFrame<'frame>

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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.