pub struct Display { /* private fields */ }
Expand description
A physical display interface.
Implementations§
Source§impl Display
impl Display
Sourcepub fn new(
device: &Arc<Device>,
swapchain: Swapchain,
info: impl Into<DisplayInfo>,
) -> Result<Self, DriverError>
pub fn new( device: &Arc<Device>, swapchain: Swapchain, info: impl Into<DisplayInfo>, ) -> Result<Self, DriverError>
Constructs a new Display
object.
Sourcepub fn acquire_next_image(
&mut self,
) -> Result<Option<SwapchainImage>, DisplayError>
pub fn acquire_next_image( &mut self, ) -> Result<Option<SwapchainImage>, DisplayError>
Gets the next available swapchain image which should be rendered to and then presented using
present_image
.
Sourcepub fn present_image(
&mut self,
pool: &mut impl ResolverPool,
render_graph: RenderGraph,
swapchain_image: SwapchainImageNode,
queue_index: u32,
) -> Result<(), DisplayError>
pub fn present_image( &mut self, pool: &mut impl ResolverPool, render_graph: RenderGraph, swapchain_image: SwapchainImageNode, queue_index: u32, ) -> Result<(), DisplayError>
Displays the given swapchain image using passes specified in render_graph
, if possible.
Sourcepub fn set_swapchain_info(&mut self, info: impl Into<SwapchainInfo>)
pub fn set_swapchain_info(&mut self, info: impl Into<SwapchainInfo>)
Sets information about the swapchain.
Previously acquired swapchain images should be discarded after calling this function.
Sourcepub fn swapchain_info(&self) -> SwapchainInfo
pub fn swapchain_info(&self) -> SwapchainInfo
Gets information about the swapchain.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Display
impl !RefUnwindSafe for Display
impl Send for Display
impl !Sync for Display
impl Unpin for Display
impl !UnwindSafe for Display
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more