libglvnd-1.7.0

Introduction to libglvnd

The libglvnd package provides OpenGL implementations that dispatch API calls to a given driver vendor. Some of the libraries are simply wrappers to the main dispatcher.

[Important]

Important

Read About OpenGL to decide if you want to install OpenGL implementations from this provider.

libglvnd Dependencies

Recommended

Installation of libglvnd

Install libglvnd by running the following commands:

mkdir build &&
cd    build &&

meson setup --prefix=/usr       \
            --buildtype=release \
            -D gles1=false      \
            -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 * &&
CC="gcc -m32" CXX="g++ -m32"         \
PKG_CONFIG_PATH=/usr/lib32/pkgconfig \
meson setup --prefix=/usr            \
            --libdir=/usr/lib32      \
            --buildtype=release      \
            -D gles1=false           \
            -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]

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 gles1=false: This disables an obsolete version of OpenGL ES.

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

-D gles2=false: If you don't need OpenGL ES, use this option. Be sure to read the section called “About GLES (OpenGL ES)”.

List of packages With Issues

While installing this package can help prevent a lot of issues down the road, this package can come with some caveats and all of them are in relation to BLFS. BLFS naturally expects that the only OpenGL vendor is Mesa, so the instructions will thus assume that this package has not been installed. The following have known issues, and solutions:

  • Mesa: In BLFS, a patch is listed in the Mesa page and will instruct you to apply it. This will cause an issue unless you explictly tell the build system not to link against this package's libraries, which means having it build its own OpenGL implementations, which will cause issues of its own. The exact error the patch causes is a linking error in the final set of steps when building the demos as it expects functions that are not found in the specific libraries from this package it tries to link against.

    Either don't apply that patch or follow this book's Mesa-25.1.5 page instead. Thanks to Mesa's build system autodetecting if libglvnd is installed, the installation instructions don't change that much between this book and BLFS. The main differences are lib32 support and not listing the demos patch.

  • GLU: In BLFS, the GLU page explictly sets the GL vendor to be Mesa as the build system will otherwise expect libglvnd and libOpenGL to be installed. While the BLFS page instructions lead to a successful compilation, the resulting library does not function properly. You should follow the SLFS GLU page instead. It also does check if the vendor is Mesa.

Contents

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

Short Descriptions

libEGL

contains EGL window-system API functions

libGL

is the legacy OpenGL library; wrapper library calling libGLdispatch and libGLX

libGLESv2

exposes OpenGL ES 2.x and 3.x entrypoints; wrapper library calling libGLdispatch

libGLX

dispatches GLX extensions to the right vendor

libGLdispatch

dispatches OpenGL and TLS to the right vendor

libOpenGL

is the new OpenGL library and exposes OpenGL entrypoints; wrapper library calling libGLdispatch