You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After adding a DRM example in #1691 I've on-and-off been using raw DRM as a base to allocate and present/flip GBM images (gbm_bo) by creating a gbm_surface (some sort of swapchain containing multiple gbm_bo's) that one can import into an EGLSurface (already supported in glutin), and once surface.swap_buffers() is called after rendering a new gbm_surface::lock_front_buffer() becomes available to flip to DRM (or to give to a compositor?) 1.
However, OpenGL via EGL also support rendering to individual gbm_bos, by importing them into an EGLImage via EGL_KHR_image_pixmap (iirc resummarized in EGL_KHR_image), and subsequently binding that to a new framebuffer via OES_EGL_image.
I've written some code to test this out successfully, and would like to ask before stuffing this into a PR: should we add an EGLImage representation to glutin's EGL backend (even though the code can already be written in "user code" against egl_display.raw_display() and egl_display.egl())? Furthermore, is there a similarity in other context APIs?
Note that eglCreateImage() can also be used to create EGLImages from/for various GL_TEXTURE_..., if I read it correctly.
Footnotes
I'd like to submit these as extra glutin_examples at some point. ↩
The text was updated successfully, but these errors were encountered:
After adding a DRM example in #1691 I've on-and-off been using raw DRM as a base to allocate and present/flip GBM images (
gbm_bo
) by creating agbm_surface
(some sort of swapchain containing multiplegbm_bo
's) that one can import into anEGLSurface
(already supported inglutin
), and oncesurface.swap_buffers()
is called after rendering a newgbm_surface::lock_front_buffer()
becomes available to flip to DRM (or to give to a compositor?) 1.However, OpenGL via EGL also support rendering to individual
gbm_bo
s, by importing them into anEGLImage
viaEGL_KHR_image_pixmap
(iirc resummarized inEGL_KHR_image
), and subsequently binding that to a new framebuffer viaOES_EGL_image
.I've written some code to test this out successfully, and would like to ask before stuffing this into a PR: should we add an
EGLImage
representation toglutin
's EGL backend (even though the code can already be written in "user code" againstegl_display.raw_display()
andegl_display.egl()
)? Furthermore, is there a similarity in other context APIs?Note that
eglCreateImage()
can also be used to createEGLImage
s from/for variousGL_TEXTURE_...
, if I read it correctly.Footnotes
I'd like to submit these as extra
glutin_examples
at some point. ↩The text was updated successfully, but these errors were encountered: