OpenGL is a graphics API that was developed by Silicon Graphics, Inc. which started off as IRIS GL. It was developed to be cross-platform as getting graphics to work had previously been different on each set of hardware. Due to pressure from other competitors, SGI open sourced IRIS GL and called it OpenGL. Nowadays, OpenGL is now managed by Khronos Group who also manages Vulkan. However, they define the standards of the APIs, but don't make drivers for the APIs, nor implement the calls.
So, Mesa came in and implemented drivers and functions for OpenGL. They also implement GLX and EGL which provide interfaces to window systems like Xorg. However, their method doesn't dispatch the calls in a vendor-neutral way. For the most part, this approach is fine and doesn't lead to any issues. NVIDIA has decided that this was a bad enough approach to warrant making another implementation of OpenGL called libglvnd. It only provides the implementations for OpenGL, OpenGL ES, GLX, and EGL. This had led to legacy OpenGL vs new OpenGL on Linux.
There is libGL
which is now
considered legacy OpenGL and is provided by both Mesa-25.1.1 and libglvnd-1.7.0. Meanwhile, there is
libOpenGL
which is considered the new
OpenGL and is only provided by libglvnd-1.7.0. Apps and libraries that
link against the legacy OpenGL will work with both providers, but
linking against the new OpenGL, which only has dispatching
functions, will result in those binaries being broken on systems
with only Mesa-25.1.1 installed.
This is only a problem for binary only packages and some CMake build systems. For this book and in BLFS, you shouldn't run into any of those issues unless you wish to use NVIDIA-575.57.08, which specifically requires libglvnd-1.7.0. LFS-QOL aims to work around issues that arise from packages having stubborn build systems, like in the case of OBS-Studio. For binary-only packages, it is generally hit or miss whether the developers link against new or legacy OpenGL. A gaming example is with ports and recompilations: the binary for Ship of Harkinian, a PC port of the Nintendo 64 game, Legend of Zelda: Ocarina of Time, links against new OpenGL and will be broken with only Mesa installed; furthermore, trying to get around the issue by building from source also leads to many issues. However, the binary of the PC port made from statically recompiling the Nintendo 64 game, Legend of Zelda: Majora's Mask, called Zelda 64: Recompiled, links against legacy OpenGL and works with both OpenGL providers.
If you only want legacy OpenGL, you can just install Mesa-25.1.1. If you want new OpenGL, support for some binary-only packages, NVIDIA-575.57.08, and get past some CMake build systems, install libglvnd-1.7.0. If you want a driver from Mesa-25.1.1, you can build that after libglvnd. Mesa will auto-detect libglvnd and will skip building its OpenGL implementations.
Switching from Mesa OpenGL to libglvnd OpenGL is sort of trivial. However, switching from libglvnd OpenGL to Mesa OpenGL requires a lot of rebuilding.
GLES, or OpenGL ES, or OpenGL for Embedded Systems, is what the full name suggests: it is a stripped down version of OpenGL, a subset, with a slightly different API here and there. It is used mostly for devices with ARM chips such as smart phones and tablets, but is also used in gaming consoles. On the Linux desktop, you typically have desktop, or full, OpenGL, EGL, GLX, and GLESv{1,2,3}.
GLES, specifically v2 and v3, are used sometimes, but mostly in one area. Such an area is in Wayland compositors and compositor libraries, such as Hyprland, Mutter, Wayfire, and Wlroots. While compositors can utilize Vulkan, most compositors require GLES rendering and don't offer a Vulkan solution, or any other rendering API solution. GLESv1 on the otherhand is an outdated specification of the GLES API that has been phased out for many years. This book disables building for GLESv1 as it is deprecated. You may build the API spec if you wish.
When the Wayland set of protocols were made, a reference implementation had to be made for it to show what was possible, and how to create a compositor for the new protocol. The result was Weston. For its rendering API, it used, and uses, GLES and EGL. This was done so that the dependency on the libraries from the X Window System wasn't needed, that a Wayland-only setup was possible. A small benefit of using GLES was that it could run on embedded systems like Raspberry Pis.
Thus, compositors and compositor libraries followed suite and did the same thing. However, any rendering API can be used as long as it can be put through EGL. Desktop OpenGL and Vulkan can be used with no issues. Today, the situation is the same and most compositors don't accept any other rendering API besides GLES.
If you are wanting to use Wayland compositors, and are going to use one that does not support Vulkan rendering, you are very likely going to have to build GLES v2 and v3, or else OpenGL and EGL rendering will not be an option. There are very few Wayland compositors that support Vulkan and do not require GLES. If you do find one, like dwl, you won't really need GLES beyond compositing. Wayland clients, which are applications, will typically just use OpenGL and/or Vulkan with EGL. This means that you would be able to skip GLES support but would kill off the ability to use other Wayland compositors that require GLES rendering.
On the otherhand, if you are using the X Window System, GLES will almost never be used and that support for the API can be disabled without much worry. However, you kill off the ability to use Wayland compositors that require GLES rendering if you want to switch over to Wayland in the future.
If you decided to disable GLES support, it is pretty easy to not build in support for the API. In “Command Explanations”, for both libglvnd-1.7.0 and Mesa-25.1.1, they will explain the options required to disable the support. Furthermore, NVIDIA-575.57.08 installs drivers for GLES. The installation instructions for that driver will cover how to delete them if you do not need GLES.
If you already have installed GLES from any of the OpenGL
providers, removing all the related files is pretty easy. You can
follow the instructions below as the root
user to remove the API:
for libdir in /usr/lib*; do rm -vf $libdir/pkgconfig/gles* rm -vrf /usr/include/GLES* rm -vf $libdir/libGLES* done ldconfig
Recompile any packages as necessary to remove the dependency on GLES.
If you have decided to revert your decision and wish to build support for GLES, just recompile OpenGL from the original OpenGL provider you went with without the option needed to disable GLESv2. You can however keep the option to disable GLESv1 as v1 is an outdated spec and not needed today.