Hacker News new | past | comments | ask | show | jobs | submit login

I'm not really sure what EGL is, but will Vulkan also run on top of EGL?



Vulkan has WSI, which is roughly equivalent to GLX or EGL in the OpenGL world.

https://github.com/KhronosGroup/Vulkan-Guide/blob/master/cha...


GLX and EGL have two roles, one is the WSI part, the other is context creation and device enumeration which Vulkan had the good sense to add to the core standard.


"For most cases, you do all the actual rendering work in GL or GLES contexts, which you create with WGL, CGL, GLX, or EGL, depending on your platform.

GL and GLES do the actual rendering. EGL and friends are basically just the glue layer to get things to the screen. (Well, to the window manager)"

https://www.reddit.com/r/opengl/comments/11q0oz/what_is_the_...


> EGL and friends are basically just the glue layer to get things to the screen. (Well, to the window manager)"

EGL can also be used directly with kernel mode setting and buffer management. No window managers necessary!

A simple example I found:

https://github.com/siro20/XlessEGL/blob/master/eglkms.c


SDL2 actually supports KMS so a number of games can run without a display server without any modifications.


That's freaking awesome. I had no idea, is this a recent addition? I've read SDL source code some years ago and I remember seeing a X11 implementation only.


It’s a spec for how GPU APIs can share data without necessary copying and converting through CPU memory. Mainly because the OpenGL specification explicitly does not define anything to do with windowing. But, EGL is not just and OpenGL - XWindows bridge. CUDA, GStreamer and several other APIs use it to communicate.


EGL is primarily about windowing system integration, it's what lets you initialize an OpenGL context in the first place.

It doesn't really accomplish interop between different APIs on its own, though of course various interop methods are based on it — e.g. if you want to import a dmabuf, you'd use EGL_EXT_image_dma_buf_import. But, say, on the Vulkan side you'd use VK_EXT_external_memory_dma_buf — there is no EGL with Vulkan, Vulkan has its own WSI subsystem.


No Vulkan dose not need/use EGL. It nativity talks to Wayland/X11.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: