Struct draw2d::graphics::frame::Frame [−][src]
pub struct Frame { pub sync: FrameSync, pub descriptor: FrameDescriptor, pub vertex_buffer: CpuBuffer, pub command_pool: ReusableCommandPool, pub framebuffer: Framebuffer, // some fields omitted }
Expand description
All per-frame resources and synchronization for this application.
Fields
sync: FrameSync
descriptor: FrameDescriptor
vertex_buffer: CpuBuffer
command_pool: ReusableCommandPool
framebuffer: Framebuffer
Implementations
pub fn create_n_frames(
device: &Arc<Device>,
framebuffers: &[Framebuffer]
) -> Result<Vec<Option<Self>>>
pub fn create_n_frames(
device: &Arc<Device>,
framebuffers: &[Framebuffer]
) -> Result<Vec<Option<Self>>>
Create a collection of frames with resource debug names based on the frame index.
Create a new frame.
Frames do not own framebuffers, it is the responsibility of the application to ensure no Frame instances are used after the swapchain has been dropped.
Begin the frame’s rendering operations.
Blocks until the previous render with this frame has finished. Resets the command pool used by this frame.
Submit command buffers to be added to the graphics queue when the frame is finished by the frame context.
Finish the frame by submitting all command buffers to the graphics queue and a semaphore which signals when rendering to the framebuffer is complete.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Frame
impl UnwindSafe for Frame
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
Checks if self
is actually part of its subset T
(and can be converted to it).
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
The inclusion map: converts self
to the equivalent element of its superset.