pub struct SurfaceConfig {
pub width: u32,
pub height: u32,
pub scale_factor: f32,
pub format: SwapchainFormat,
pub present_mode: PresentMode,
pub refresh_rate: RefreshRate,
}Expand description
Configuration descriptor for a presentation surface and its swapchain.
Fields§
§width: u32§height: u32§scale_factor: f32§format: SwapchainFormat§present_mode: PresentMode§refresh_rate: RefreshRateImplementations§
Source§impl SurfaceConfig
impl SurfaceConfig
Sourcepub fn physical_width(&self) -> u32
pub fn physical_width(&self) -> u32
Physical width in backing store pixels: ⌈logical_width * scale_factor⌉.
Sourcepub fn physical_height(&self) -> u32
pub fn physical_height(&self) -> u32
Physical height in backing store pixels: ⌈logical_height * scale_factor⌉.
Sourcepub fn physical_size(&self) -> (u32, u32)
pub fn physical_size(&self) -> (u32, u32)
Physical dimensions as (width, height) tuple.
Sourcepub fn buffer_byte_size(&self) -> usize
pub fn buffer_byte_size(&self) -> usize
Total byte footprint for a single physical frame buffer at this configuration.
Trait Implementations§
Source§impl Clone for SurfaceConfig
impl Clone for SurfaceConfig
Source§impl Debug for SurfaceConfig
impl Debug for SurfaceConfig
Auto Trait Implementations§
impl Forget for SurfaceConfig
impl Freeze for SurfaceConfig
impl Move for SurfaceConfig
impl RefUnwindSafe for SurfaceConfig
impl Send for SurfaceConfig
impl Sync for SurfaceConfig
impl Unpin for SurfaceConfig
impl UnsafeUnpin for SurfaceConfig
impl UnwindSafe for SurfaceConfig
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