Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use Xlib headers by default. (#130)
Conceptually, defining EGLNativeDisplayType to Display* is simply incorrect, because it's not always going to be an Xlib display. In practice, more and more programs and libraries are being built with EGL but without Xlib, and end up breaking when the Xlib headers are missing. Rather than requiring every such program to define EGL_NO_X11, use the (void*) typedef by default. The existing USE_X11 header can still preserve the current behavior. The change to EGLNativeDisplayType will be fine for eglGetDisplay, since you can always pass a (Display *) as a (void *) parameter. The EGLNativePixmapType and EGLNativeWindowType types don't change, because khronos_uintptr_t and XID are both typedefs to unsigned long. The only things that might break are calls to eglQueryNativeDisplayNV, or programs that do need the Xlib headers and expect egl.h to include them. Both of those cases would be trivial to fix.
- Loading branch information