pub enum SwapInterval {
None,
Adaptive,
Sync(u32),
}Expand description
Specifies how the context should handle swapping the buffers.
i.e. the number of screen updates to wait from the time
glfwSwapBuffers/context.swap_buffers
was called before swapping the buffers and returning.
Variants§
None
Specifies no waits
Adaptive
If either of the WGL_EXT_swap_control_tear and GLX_EXT_swap_control_tear extensions
are enabled, allows the adaptively swap the frame. Sometimes called Adaptive V-sync
Sync(u32)
Synchronizes the buffers every N frames. Set to 1 for V-sync
Trait Implementations§
Source§impl Clone for SwapInterval
impl Clone for SwapInterval
Source§fn clone(&self) -> SwapInterval
fn clone(&self) -> SwapInterval
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SwapInterval
Source§impl Debug for SwapInterval
impl Debug for SwapInterval
impl Eq for SwapInterval
Source§impl Hash for SwapInterval
impl Hash for SwapInterval
Source§impl Ord for SwapInterval
impl Ord for SwapInterval
Source§fn cmp(&self, other: &SwapInterval) -> Ordering
fn cmp(&self, other: &SwapInterval) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SwapInterval
impl PartialEq for SwapInterval
Source§fn eq(&self, other: &SwapInterval) -> bool
fn eq(&self, other: &SwapInterval) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SwapInterval
impl PartialOrd for SwapInterval
impl StructuralPartialEq for SwapInterval
Auto Trait Implementations§
impl Freeze for SwapInterval
impl RefUnwindSafe for SwapInterval
impl Send for SwapInterval
impl Sync for SwapInterval
impl Unpin for SwapInterval
impl UnsafeUnpin for SwapInterval
impl UnwindSafe for SwapInterval
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more