Enum glutin::display::DisplayApiPreference
source · pub enum DisplayApiPreference {
Egl,
Wgl(Option<RawWindowHandle>),
EglThenWgl(Option<RawWindowHandle>),
WglThenEgl(Option<RawWindowHandle>),
}
Expand description
Preference of the display that should be used.
Variants§
Egl
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.
§Platform-specific
Windows: ANGLE can be used if libEGL.dll
and libGLESv2.dll
are
in the library search path.
Wgl(Option<RawWindowHandle>)
wgl_backend
only.Use only WGL.
The most spread platform on Windows and what should be used on it by default. EGL usually not present there so you’d have to account for that and create the window beforehand.
When raw window handle isn’t provided the display will lack extensions support and most features will be lacking.
EglThenWgl(Option<RawWindowHandle>)
egl_backend
and wgl_backend
only.WglThenEgl(Option<RawWindowHandle>)
egl_backend
and wgl_backend
only.