Enum let_engine::prelude::PresentMode
source · #[non_exhaustive]pub enum PresentMode {
Immediate,
Mailbox,
Fifo,
}
Expand description
The presentation action to take when presenting images to the window.
In game engine terms this affects “VSync”.
Immediate
mode is the only one that does not have “VSync”.
When designing in game graphics settings this is the setting that gets changed when users select the VSync option.
The vsync options may include higher latency than the other ones.
It is not recommended dynamically switching between those during the game, as they may cause visual artifacts or noticable changes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Immediate
This one has no vsync and presents the image as soon as it is available.
This may happen while the image is presenting, so it may cause tearing.
This present mode has the lowest latency compared to every other mode, so this is the option for most fast paced games where latency matters.
This present mode may not be available on every device.
Mailbox
This present mode has a waiting slot for the next image to be presented after the current one has finished presenting. This mode also does not block the drawing thread, drawing images, even when they will not get presented.
This means there is no tearing and with just one waiting slot also not that much latency.
This option is recommended if Immediate
is not available and also for games that focus visual experience over latency, as this one does not have tearing.
It may also not be available on every device.
Fifo
Means first in first out.
This present mode is also known as “vsync on”. It blocks the thread and only draws and presents images if the present buffer is finished drawing to the screen.
It is guaranteed to be available on every device.
Trait Implementations§
source§impl Clone for PresentMode
impl Clone for PresentMode
source§fn clone(&self) -> PresentMode
fn clone(&self) -> PresentMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PresentMode
impl Debug for PresentMode
source§impl From<PresentMode> for PresentMode
impl From<PresentMode> for PresentMode
source§fn from(value: PresentMode) -> PresentMode
fn from(value: PresentMode) -> PresentMode
source§impl From<PresentMode> for PresentMode
impl From<PresentMode> for PresentMode
source§fn from(value: PresentMode) -> PresentMode
fn from(value: PresentMode) -> PresentMode
source§impl PartialEq for PresentMode
impl PartialEq for PresentMode
source§fn eq(&self, other: &PresentMode) -> bool
fn eq(&self, other: &PresentMode) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for PresentMode
impl Eq for PresentMode
impl StructuralPartialEq for PresentMode
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§
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.