Enum glutin::display::DisplayApiPreference
source · 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.GlxThenEgl(XlibErrorHookRegistrar)
Available on
egl_backend
and glx_backend
only.Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DisplayApiPreference
impl !Send for DisplayApiPreference
impl !Sync for DisplayApiPreference
impl Unpin for DisplayApiPreference
impl !UnwindSafe for DisplayApiPreference
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