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>
impl<'frame> VulkanFrame<'frame>
Sourcepub fn as_raw_mut(&mut self) -> *mut QarVideoFrameVulkan
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.
Sourcepub fn set_image_state(
&mut self,
index: usize,
layout: ImageLayout,
queue_family_index: u32,
) -> Result<()>
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.
Sourcepub fn release_to_external(&mut self, layout: ImageLayout)
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.
Methods from Deref<Target = VulkanFrameState<'frame>>§
Sourcepub fn views(&self) -> Vec<VideoFrameView>
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.
Sourcepub fn view_index(&self, eye: Eye, kind: ViewKind) -> Option<usize>
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).
Sourcepub fn image_count(&self) -> usize
pub fn image_count(&self) -> usize
Number of sender-owned images in the frame.
Sourcepub fn image(&self, index: usize) -> Option<VulkanImage>
pub fn image(&self, index: usize) -> Option<VulkanImage>
The image a view’s texture_index names.
Sourcepub fn images(&self) -> Vec<VulkanImage>
pub fn images(&self) -> Vec<VulkanImage>
Every image of the frame, in texture_index order.