What's the difference/relationship between GLFW and EGL?

648 Views Asked by At

I know that GLFW can help create context and manage window/... for OpenGL, OpenGL ES, and Vulkan;

Also learned that, in Android, we use EGL + OpenGL ES;

So my question is, is EGL a part of GLFW (like OpenGL ES is part of OpenGL)?

Or they are separate things, EGL can only be used on Android and GLFW can only be used on Windows, Linux, and Mac?

1

There are 1 best solutions below

2
Tommy On

OpenGL doesn't define the binding between itself and a host OS, so e.g. you'd use GLX to display OpenGL content within X11, WGL on Windows, CGL on OS X, etc, etc.

EGL was originally Kronos' centrally-advocated solution for binding OpenGL ES to the native windowing system on embedded devices, and as well as Android is available on the various wish-they-were-Androids: Tizen, BlackBerry, etc. Nowadays it has reach beyond OpenGL ES but is still otherwise focussed merely on the stuff of creating and destroying contexts and buffers, alongside on- and off-screen rendering targets.

GLFW is a third-party toolkit for desktop OSes with standard windowing systems, providing a common frontage for creating a window and receiving input from the usual desktop-type devices: keyboards, mice and joysticks.

So, to answer directly:

EGL is not part of GLFW and is not related in the same way that OpenGL ES is related to OpenGL; it's a separate project from a separate team, albeit with some overlap in objectives.