Struct ccthw::graphics::vulkan_api::Frame
source · pub struct Frame { /* private fields */ }
Expand description
The current animation Frame.
The Frame does not own any resources and it is an error to retain copies of
any of the Frame’s resource handle after calling present_frame
.
Implementations§
source§impl Frame
impl Frame
sourcepub fn command_buffer(&self) -> CommandBuffer
pub fn command_buffer(&self) -> CommandBuffer
The primary command buffer for the current frame.
The buffer is already started when given to a Frame so commands can be freely added without any additional setup.
The buffer is submitted automatically when the frame is returned for presentation.
sourcepub fn frame_index(&self) -> usize
pub fn frame_index(&self) -> usize
The current frame’s index. Always in the range [0-N) where N is the number of frames in flight.
sourcepub fn swapchain_image_index(&self) -> usize
pub fn swapchain_image_index(&self) -> usize
The index of the swapchain image being targeted by this frame.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Frame
impl !Send for Frame
impl !Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations§
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.