Intro to OpenGL

What is OpenGL

OpenGL is a graphics API standard and interface that most applications on Linux that are not terminal based use and often times solely rely on. While things are progressing to switch to Vulkan, as well as graphics drivers with the help of Mesa's Zink driver, a full Vulkan desktop is impossible for most people. This makes OpenGL and its drivers a requirement. Notable packages that require the libraries and drivers are in this book: Steam-1.0.0.81 and Wine-9.14.

Beyond those two packages and getting the desktop working are several applications and packages which are only written in OpenGL using very old libraries and haven't added Vulkan support, and many games on the Steam platform are OpenGL only.

What do I need to install?

The OpenGL libraries for Linux are provided by either libglvnd-1.7.0 or Mesa-24.2.2, depending on preference or which applications you wish to install and run.

libglvnd supplies an OpenGL library that can arbitrate calls between multiple vendors, which is useful in certain circumstances that Steam-1.0.0.81 determined necessary to depend on. This is why many distros do not ship the OpenGL library supplied by Mesa and instead ship the one by libglvnd.

Mesa provides OpenGL libraries specific to your vendor of your graphics card (AMD for Radeon, NVIDIA for GTX, RTX, etc. and so on). Most applications can use these libraries just fine, save for some extensions only being used by some vendors, which the programmer who made the OpenGL application likely thought about those extensions anyway. However, Steam-1.0.0.81 depends on the OpenGL libraries given by libglvnd. Due to how the Mesa project is set up, it is located in the Graphics Driver subsection of this chapter. Feel free to skip to the Vulkan installation or the Graphics Driver subsection if you want to compile Mesa's OpenGL libraries. To compile Mesa's OpenGL libraries, compile it normally without setting -Dglvnd=true.