libglvnd-1.7.0

#### Gaming Linux® From Scratch - Version 13.0

### Chapter 10. Graphics APIs

- Prev

  About OpenGL

- Next

  GLU-9.0.3

- Up
- Home

# libglvnd-1.7.0

## Introduction to libglvnd

The libglvnd package dispatches OpenGL API calls to a given driver vendor at runtime. Some of the libraries are simply wrappers to the main dispatcher. Drivers that are built with libglvnd in mind provide their own OpenGL functionality. For Mesa-25.3.5, it will install `libEGL_mesa` and `libGLX_mesa`. For NVIDIA, it will provide `libEGL_nvidia`, `libGLX_nvidia`, and others. Each implementation is specific to the driver it comes from. The benefit of doing it this way is that a driver doesn't have to obey to the architecture an OpenGL vendor uses, nor does it have to be absorbed by the vendor.

### Important

If you've come here from the BLFS Mesa page, please read About OpenGL for information regarding how to navigate BLFS, compatibility, and transitioning.

### Important

For the lib32 installation instructions, they require new Meson cross files from MLFS, as `--libdir=/usr/lib32` has been moved to the cross files and no longer appear in the instructions. Install the new cross files so that 32-bit libraries don't get installed in `/usr/lib`.

- Download: https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v1.7.0/libglvnd-v1.7.0.tar.gz

### libglvnd Dependencies

Recommended
Xorg Libraries [2]

## Installation of libglvnd

Install libglvnd by running the following commands:

    mkdir build &&
    cd    build &&

    meson setup --prefix=/usr       \
                --buildtype=release \
                -D hgl=false        \
                .. &&

    ninja

Now as the `root` user:

    ninja install

## lib32 Installation of libglvnd

Install lib32-libglvnd by running the following commands:

    rm -rf * &&
    meson setup --prefix=/usr       \
                --buildtype=release \
                --cross-file=lib32  \
                -D hgl=false        \
                .. &&

    ninja

Now as the `root` user:

    DESTDIR=$PWD/DESTDIR ninja install    &&
    cp -vr DESTDIR/usr/lib32/* /usr/lib32 &&
    rm -rf DESTDIR                        &&
    ldconfig

## Command Explanations

### Note

Inspect `meson_options.txt` or `meson.options` for a full list of options.

`--buildtype=release`: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

`-D hgl=false`: This disables targeting Haiku by default as this guide is for Linux, not Haiku.

`-D gles1=false`: If you don't need the older version of OpenGL ES, use this option. Some games use GLESv1 still.

`-D gles2=false`: If you don't need OpenGL ES, use this option.

## Contents

Installed Programs: None
Installed Libraries: libEGL, libGL, libGLESv1_CM, libGLESv2, libGLX, libGLdispatch, and libOpenGL
Installed Directories: /usr/include/{EGL,GL,GLES{,2,3},glvnd,KHR}

### Short Descriptions

`libEGL` | contains EGL window-system API functions
`libGL` | is the OpenGL library tied to GLX; wrapper library calling `libGLdispatch` and `libGLX`
`libGLESv1_CM` | exposes the OpenGL ES 1.x common profile entrypoints; wrapper library calling `libGLdispatch`
`libGLESv2` | exposes OpenGL ES 2.x and 3.x entrypoints; v2 and up removed profiles, which is why `libGLESv1_CM` contains `_CM` but this library doesn't; wrapper library calling `libGLdispatch`
`libGLX` | dispatches GLX extensions to the right vendor
`libGLdispatch` | dispatches OpenGL and TLS to the right vendor
`libOpenGL` | is the OpenGL library untied to any window system and exposes OpenGL entrypoints; wrapper library calling `libGLdispatch`

[2] If Xorg Libraries is not installed, this package will not provide `libGL` or `libGLX`. `libOpenGL` will still be built. Many build systems will expect `libGL` to be present, so it is heavily recommended to install Xorg Libraries before installing this package.

- Prev

  About OpenGL

- Next

  GLU-9.0.3

- Up
- Home