pub enum DisplayApiPreference {
    Egl,
    Glx(XlibErrorHookRegistrar),
    EglThenGlx(XlibErrorHookRegistrar),
    GlxThenEgl(XlibErrorHookRegistrar),
}
Expand description

Preference of the display that should be used.

Variants§

§

Egl

Available on egl_backend only.

Use only EGL.

The EGL is a cross platform recent OpenGL platform. That being said it’s usually lacking on Windows and not present at all on macOS natively.

Be also aware that some features may not be present with it, like window transparency on X11 with mesa.

But despite this issues it should be preferred on at least Linux over GLX, given that GLX is phasing away.

§

Glx(XlibErrorHookRegistrar)

Available on glx_backend only.

Use only GLX.

The native GLX platform, it’s not very optimal since it’s usually tied to Xlib. It’s know to work fine, but be aware that you must register glutin with your X11 error handling callback, since it’s a per-process global state.

The hook to register glutin error handler in the X11 error handling function.

§

EglThenGlx(XlibErrorHookRegistrar)

Available on egl_backend and glx_backend only.

Prefer EGL and fallback to GLX.

See Egl and Glx to decide what you want.

§

GlxThenEgl(XlibErrorHookRegistrar)

Available on egl_backend and glx_backend only.

Prefer GLX and fallback to EGL.

See Egl and Glx to decide what you want.

Trait Implementations§

source§

impl Debug for DisplayApiPreference

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.