Enum wgpu::PresentMode [−][src]
#[repr(C)]
pub enum PresentMode {
Immediate,
Mailbox,
Fifo,
}
Expand description
Behavior of the presentation engine based on frame rate.
Variants
Immediate
The presentation engine does not wait for a vertical blanking period and
the request is presented immediately. This is a low-latency presentation mode,
but visible tearing may be observed. Will fallback to Fifo
if unavailable on the
selected platform and backend. Not optimal for mobile.
Mailbox
The presentation engine waits for the next vertical blanking period to update
the current image, but frames may be submitted without delay. This is a low-latency
presentation mode and visible tearing will not be observed. Will fallback to Fifo
if unavailable on the selected platform and backend. Not optimal for mobile.
Fifo
The presentation engine waits for the next vertical blanking period to update
the current image. The framerate will be capped at the display refresh rate,
corresponding to the VSync
. Tearing cannot be observed. Optimal for mobile.
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<PresentMode, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<PresentMode, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for PresentMode
impl Send for PresentMode
impl Sync for PresentMode
impl Unpin for PresentMode
impl UnwindSafe for PresentMode
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.