-
-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add extra EGL extensions #1668
Add extra EGL extensions #1668
Conversation
Fwiw for #1658 I'd also like to use updated EGL bindings from Unfortunately it seems that efforts to transition ownership of |
I'm not sure how we should expose the ref to Maybe we should have a method to manually load(which will return I'm also interested in solving the generator issue upstream, but I'll see what we can do |
I added some functions to access the APIs for EGL and GLX. This works for my usecase at least, so maybe that's enough to just merge it? Let me know if you want a cleaner/more elaborate solution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what to do with wgl...
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.
pub const TEXTURE_Y_XUXV_WL: i32 = 0x31D9; | ||
pub const TEXTURE_EXTERNAL_WL: i32 = 0x31DA; | ||
// Accepted in the <attribute> parameter of eglQueryWaylandBufferWL. | ||
pub const EGL_TEXTURE_FORMAT: i32 = 0x3080; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.rs/glutin_egl_sys/latest/glutin_egl_sys/egl/constant.TEXTURE_FORMAT.html this already exists, without the EGL_
prefix?
For completeness, since I mentioned updating EGL headers in https://github.com/MarijnS95/glutin/compare/gl-generator-update |
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:
Currently this PR doesn't really implement a good way to access this new functionality, instead it just exposes the
EGL
static publicly. Ideally there would be some abstraction that retrieves theEgl
object, while automatically making sure it is initialized.So I see two options, feedback appreciated:
EGL.as_ref()?
(does not ensure initialization)Display
(requires display creation)