pub enum DisplayApiPreference {
Egl,
Glx(XlibErrorHookRegistrar),
EglThenGlx(XlibErrorHookRegistrar),
GlxThenEgl(XlibErrorHookRegistrar),
}
Expand description
Preference of the display that should be used.
Variants§
Egl
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.
Glx(XlibErrorHookRegistrar)
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.