Enum glfw::SwapInterval
source · 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 copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SwapInterval
impl Debug 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 · 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
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SwapInterval
impl PartialOrd for SwapInterval
source§fn partial_cmp(&self, other: &SwapInterval) -> Option<Ordering>
fn partial_cmp(&self, other: &SwapInterval) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for SwapInterval
impl Eq for SwapInterval
impl StructuralPartialEq for SwapInterval
Auto Trait Implementations§
impl RefUnwindSafe for SwapInterval
impl Send for SwapInterval
impl Sync for SwapInterval
impl Unpin 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