The generated code already defines `TEXTURE_FORMAT` to `0x3080` with the
usual `EGL_` prefix stripped; we shouldn't be redefining it (with this
unnecessary prefix) in manual code.
This patch adds multiple new EGL extensions which are useful for
implementing Wayland applications. These have been mostly implemented
manually, since gl_generator lacks support for these newer EGL
extensions (except for `EGL_KHR_image_base`).
The following extensions were added:
- EGL_KHR_image_base
- EGL_WL_bind_wayland_display
- EGL_WL_create_wayland_buffer_from_image
This also exposes EGL and GLX raw API calls on EGL and GLX displays.
- `icrate` has been deprecated in favour of separate crates per
framework, in our case `objc2-foundation` and `objc2-app-kit`.
- Moved `MainThreadMarker::run_on_main` to free-standing function
`run_on_main`.
- Changed how features work, this should result in less code that needs
to be compiled.
Links: https://github.com/madsmtm/objc2/pull/526
Fixup "intradoc" links having `[]` inside backticks, meaning they
won't be links but actual brackets in monospace in the final doc.
Make `wayland` feature depend on `egl` backend to compile and
function.
The issue is that CGLContextObj changed its encoding in macOS Sonoma
14.0. The encoding of a type is something that objc2 uses to
debug-assert that the definition is written correctly, but of course, if
the Rust code assumes that the encoding is one thing, and it then
changes, then the debug assertion will now fail.
Fixes#1640.
The api/egl always disabled debug when `NO_ERROR` was present in
extensions to avoid errors, however the error will be thrown only
when using `NO_ERROR` and debug context at the same time.
Fix the same issues with GLX/WGL as well as properly enable `NO_ERROR`
for those backends.
Fixes: #1635