[][src]Enum rafx_api::vulkan::VkPresentMode

pub enum VkPresentMode {
    Immediate,
    Mailbox,
    Fifo,
    FifoRelaxed,
}

Used to select which PresentMode is preferred. Some of this is hardware/platform dependent and it's a good idea to read the Vulkan spec.

Fifo is always available on Vulkan devices that comply with the spec and is a good default for many cases.

Values here match VkPresentModeKHR

Variants

Immediate

(VK_PRESENT_MODE_IMMEDIATE_KHR) - No internal buffering, and can result in screen tearin.

Mailbox

(VK_PRESENT_MODE_MAILBOX_KHR) - This allows rendering as fast as the hardware will allow, but queues the rendered images in a way that avoids tearing. In other words, if the hardware renders 10 frames within a single vertical blanking period, the first 9 will be dropped. This is the best choice for lowest latency where power consumption is not a concern.

Fifo

(VK_PRESENT_MODE_FIFO_KHR) - Default option, guaranteed to be available, and locks screen draw to vsync. This is a good default choice generally, and more power efficient than mailbox, but can have higher latency than mailbox.

FifoRelaxed

(VK_PRESENT_MODE_FIFO_RELAXED_KHR) - Similar to Fifo but if rendering is late, screen tearing can be observed.

Implementations

impl VkPresentMode[src]

pub fn to_vk(self) -> PresentModeKHR[src]

Convert to vk::PresentModeKHR

Trait Implementations

impl Clone for VkPresentMode[src]

impl Copy for VkPresentMode[src]

impl Debug for VkPresentMode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: Downcast + Send + Sync
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.