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. |
kchibisov
left a comment
There was a problem hiding this comment.
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.
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
EGLstatic publicly. Ideally there would be some abstraction that retrieves theEglobject, 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)