- Use c_uint32 for EGLboolean return type (unsigned int per EGL spec, not _Bool)
- Try all enumerated EGL devices in order rather than only the first;
skip devices where eglGetPlatformDisplayEXT or eglInitialize fails
- Extract device enumeration into _egl_device_display() helper
- Use ctypes.util.find_library("EGL") instead of hardcoded libEGL.so.1
- Fix eglGetDisplay(EGL_DEFAULT_DISPLAY) failure also falling through to
device enumeration (previously raised immediately, skipping the fallback)
- Two-pass eglQueryDevicesEXT to avoid arbitrary device count cap
On headless Linux with NVIDIA GPUs and no display server, eglInitialize()
with EGL_DEFAULT_DISPLAY fails with EGL_BAD_ACCESS. The fix falls back to
EGL_EXT_platform_device: enumerate EGL devices and obtain a display via
eglGetPlatformDisplayEXT(EGL_PLATFORM_DEVICE_EXT, ...).
PyOpenGL's egl_get_devices() wrapper doesn't reliably resolve the
eglQueryDevicesEXT function pointer in this scenario, so both functions
are called directly from libEGL.so.1 via ctypes.
Also handles the case where eglInitialize raises EGLError rather than
returning False, which varies by PyOpenGL version and EGL vendor.