[][src]Struct qt_gui::q_surface_format::SwapBehavior

#[repr(transparent)]
pub struct SwapBehavior(_);

This enum is used by QSurfaceFormat to specify the swap behaviour of a surface. The swap behaviour is mostly transparent to the application, but it affects factors such as rendering latency and throughput.

C++ enum: QSurfaceFormat::SwapBehavior.

C++ documentation:

This enum is used by QSurfaceFormat to specify the swap behaviour of a surface. The swap behaviour is mostly transparent to the application, but it affects factors such as rendering latency and throughput.

Methods

impl SwapBehavior[src]

pub fn to_int(&self) -> c_int[src]

impl SwapBehavior[src]

pub const DefaultSwapBehavior: SwapBehavior[src]

The default, unspecified swap behaviour of the platform. (C++ enum variant: DefaultSwapBehavior = 0)

pub const SingleBuffer: SwapBehavior[src]

Used to request single buffering, which might result in flickering when OpenGL rendering is done directly to screen without an intermediate offscreen buffer. (C++ enum variant: SingleBuffer = 1)

pub const DoubleBuffer: SwapBehavior[src]

This is typically the default swap behaviour on desktop platforms, consisting of one back buffer and one front buffer. Rendering is done to the back buffer, and then the back buffer and front buffer are swapped, or the contents of the back buffer are copied to the front buffer, depending on the implementation. (C++ enum variant: DoubleBuffer = 2)

pub const TripleBuffer: SwapBehavior[src]

This swap behaviour is sometimes used in order to decrease the risk of skipping a frame when the rendering rate is just barely keeping up with the screen refresh rate. Depending on the platform it might also lead to slightly more efficient use of the GPU due to improved pipelining behaviour. Triple buffering comes at the cost of an extra frame of memory usage and latency, and might not be supported depending on the underlying platform. (C++ enum variant: TripleBuffer = 3)

Trait Implementations

impl Clone for SwapBehavior[src]

impl Copy for SwapBehavior[src]

impl Debug for SwapBehavior[src]

impl Eq for SwapBehavior[src]

impl From<SwapBehavior> for c_int[src]

impl From<i32> for SwapBehavior[src]

impl PartialEq<SwapBehavior> for SwapBehavior[src]

impl StructuralEq for SwapBehavior[src]

impl StructuralPartialEq for SwapBehavior[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, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

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

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

impl<T> StaticUpcast<T> for T[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.