pub struct GpuSwapchain {
pub width: u32,
pub height: u32,
pub format: SwapchainFormat,
pub present_mode: GpuPresentMode,
pub textures: Vec<GpuTextureHandle>,
pub current_index: usize,
pub presented_count: u64,
}Expand description
Hardware swapchain managing surface texture queue and presentation timing.
Fields§
§width: u32§height: u32§format: SwapchainFormat§present_mode: GpuPresentMode§textures: Vec<GpuTextureHandle>§current_index: usize§presented_count: u64Implementations§
Source§impl GpuSwapchain
impl GpuSwapchain
pub fn new( width: u32, height: u32, format: SwapchainFormat, present_mode: GpuPresentMode, ) -> Self
pub fn acquire_next_texture( &mut self, ) -> Result<&mut GpuTextureHandle, PresentError>
pub fn present(&mut self) -> Result<(), PresentError>
pub fn resize(&mut self, width: u32, height: u32)
Trait Implementations§
Auto Trait Implementations§
impl Forget for GpuSwapchain
impl Freeze for GpuSwapchain
impl Move for GpuSwapchain
impl RefUnwindSafe for GpuSwapchain
impl Send for GpuSwapchain
impl Sync for GpuSwapchain
impl Unpin for GpuSwapchain
impl UnsafeUnpin for GpuSwapchain
impl UnwindSafe for GpuSwapchain
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