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
impl OwnedFrame
Sourcepub fn view(&self, view_index: usize) -> Result<ViewPose>
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.
Sourcepub fn cpu_frame(&mut self) -> Result<CpuFrame<'_>>
pub fn cpu_frame(&mut self) -> Result<CpuFrame<'_>>
The CPU textures to write this frame’s pixels into
(qar_render_sender_frame_cpu).
Sourcepub fn vulkan_frame(&mut self) -> Result<VulkanFrame<'_>>
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.
Sourcepub fn d3d11_frame(&self) -> Result<D3D11Frame<'_>>
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.
Sourcepub fn show(self, params: &ShowParams) -> Result<()>
pub fn show(self, params: &ShowParams) -> Result<()>
Presents the frame (qar_render_sender_show_frame) with the near and
far planes actually used.