Struct vulkano::display::DisplayMode
source · pub struct DisplayMode { /* private fields */ }
Expand description
Represents a mode on a specific display.
A display mode describes a supported display resolution and refresh rate.
Implementations§
source§impl DisplayMode
impl DisplayMode
sourcepub fn new(
display: Arc<Display>,
create_info: DisplayModeCreateInfo
) -> Result<Arc<Self>, Validated<VulkanError>>
pub fn new( display: Arc<Display>, create_info: DisplayModeCreateInfo ) -> Result<Arc<Self>, Validated<VulkanError>>
Creates a custom display mode.
sourcepub fn from_handle(
display: Arc<Display>,
handle: DisplayModeKHR,
create_info: DisplayModeCreateInfo
) -> Arc<Self>
pub fn from_handle( display: Arc<Display>, handle: DisplayModeKHR, create_info: DisplayModeCreateInfo ) -> Arc<Self>
Creates a new DisplayMode
from a raw object handle.
Safety
handle
must be a valid Vulkan object handle created fromdisplay
.create_info
must match the info used to create the object, or retrieved fromdisplay
.
sourcepub fn visible_region(&self) -> [u32; 2]
pub fn visible_region(&self) -> [u32; 2]
Returns the extent of the visible region.
sourcepub fn refresh_rate(&self) -> u32
pub fn refresh_rate(&self) -> u32
Returns the refresh rate in millihertz (i.e. 60_000
is 60 times per second).
sourcepub fn display_plane_capabilities(
&self,
plane_index: u32
) -> Result<DisplayPlaneCapabilities, Validated<VulkanError>>
pub fn display_plane_capabilities( &self, plane_index: u32 ) -> Result<DisplayPlaneCapabilities, Validated<VulkanError>>
Returns the capabilities of a display plane, when used with this display mode.
Trait Implementations§
source§impl Debug for DisplayMode
impl Debug for DisplayMode
source§impl Hash for DisplayMode
impl Hash for DisplayMode
source§impl InstanceOwned for DisplayMode
impl InstanceOwned for DisplayMode
source§impl PartialEq for DisplayMode
impl PartialEq for DisplayMode
source§impl VulkanObject for DisplayMode
impl VulkanObject for DisplayMode
impl Eq for DisplayMode
Auto Trait Implementations§
impl !RefUnwindSafe for DisplayMode
impl Send for DisplayMode
impl Sync for DisplayMode
impl Unpin for DisplayMode
impl !UnwindSafe for DisplayMode
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