Mesa-Demos-9.0.0

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

### Chapter 12. Graphical Applications

- Prev

  libvpl-tools-1.5.0

- Next

  OBS-Studio-32.0.4

- Up
- Home

# Mesa-Demos-9.0.0

## Introduction to Mesa-Demos

The Mesa-Demos package provides multiple demos to test the installation of multiple graphics APIs and drivers for those APIs, such as OpenGL, EGL, Vulkan, and more.

- Download: https://gitlab.freedesktop.org/mesa/demos/-/archive/mesa-demos-9.0.0/demos-mesa-demos-9.0.0.tar.gz

### Additional Downloads

- Required patch: https://gitlab.archlinux.org/archlinux/packaging/packages/mesa-demos/-/raw/main/mesa-demos-system-data.patch

### mesa-demos Dependencies

#### Required

OpenGL (libglvnd or Mesa; Mesa's GL is not supported) [6]

#### Recommended

- libpng: Required for the readtex utility.

- GBM (libgbm or Mesa): Required for EGL with KMS (Kernel Mode Setting).

- glslang and Vulkan-Loader: Required for Vulkan demos.

- libxkbcommon: Required for X11/Wayland demos.

- Xorg Libraries: Required for X11 demos.

- libdecor-0.2.5 (will be downloaded if it is not installed), Wayland, and Wayland-Protocols: Required for Wayland demos.

- Freeglut (with GLU): Recommended for X11 demos; will be automatically downloaded if it is not disabled or installed.

## Installation of Mesa-Demos

First apply a patch so that shaders and other necessary data get copied over during installation:

    patch -Np1 -i ../mesa-demos-system-data.patch

Install Mesa-Demos by running the following commands:

    mkdir build &&
    cd    build &&

    meson setup --prefix=/usr --buildtype=release .. &&
    ninja

Now do a destdir installation and rename some binaries that conflict with other packages outside of the LFS books:

    DESTDIR=$PWD/DESTDIR ninja install &&
    for bin in {identity,linktest,poly}; do
      mv -v DESTDIR/usr/bin/{$bin,mesa-$bin}
    done

If you only want the utilities, or important demos built by this package, install just them as the `root` user:

    mesa_utils=(
      eglgears_wayland
      eglgears_x11
      eglinfo
      eglkms
      egltri_wayland
      egltri_x11
      es1_info
      es2_info
      es2gears_wayland
      es2gears_x11
      es2tri
      gears
      glxgears
      glxinfo
      peglgears
      tri
      vkgears
      xeglgears
    )
    for util in ${mesa_utils[@]}; do
      install -vDm755 DESTDIR/usr/bin/$util -t /usr/bin/
    done
    cp -vR DESTDIR/usr/share/* /usr/share

### Note

You may get multiple errors of a given utility not being able to be installed. This is normal as you likely won't have every utility built. A number of them should still get installed, however.

If you wish to install every demo (less important binaries built in this package), then run the following command as the `root` user:

    cp -vR DESTDIR/usr/* /usr

## Command Explanations

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

## Contents

### Note

Not every demo will be shown here. Please check all the built binaries in `$DESTDIR/usr/bin` as it will greatly vary depending on what you have installed, how you built OpenGL, etc.

Installed Utilities: eglgears_wayland, eglgears_x11, eglinfo, eglkms, egltri_wayland, egltri_x11, es1_info, es2_info, es2gears_wayland, es2gears_x11, es2tri, gears, glxgears, glxinfo, peglgears, tri, vkgears, and xeglgears
Installed Libraries: None
Installed Directories: /usr/share/mesa-demos

### Short Descriptions

eglgears_wayland | displays 3D rotating gears through the EGL API on a Wayland client
eglgears_x11 | displays 3D rotating gears through the EGL API on a X11 server
eglinfo | displays useful information about the drivers in use and installed hardware via the EGL api
eglkms | displays an RGB triangle using the EGL API with KMS to be independent from both X11 and Wayland
egltri_wayland | displays an RGB triangle using the EGL API on a Wayland client
egltri_x11 | displays an RGB triangle using the EGL API on an X11 server
es1_info | displays useful information about the drivers in use and installed hardware via the OpenGL ES v1 API
es2_info | displays useful information about the drivers in use and installed hardware via the OpenGL ES v2 API
es2gears_wayland | displays 3D rotating gears through the OpenGL ES v2 API on a Wayland client
es2gears_x11 | displays 3D rotating gears through the Open GLES v2 API on an X11 server
es2tri | displays an RGB triangle using the OpenGL ES v2 API
gears | displays 3D rotating gears through normal OpenGL via a GLUT variant or OpenGL ES
glxgears | displays 3D rotating gears through the GLX API
glxinfo | displays useful information about the drivers in use and installed hardware via the GLX API
peglgears | a straight port of glxgears for EGL
tri | displays an RGB triangle using normal OpenGL via a GLUT variant or OpenGL ES
vkgears | displays 3D rotating gears through the Vulkan API
xeglgears | displays 3D rotating gears through the GLX/EGL/GLES API, though its source code notes it uses full OpenGL presently

[6] The more support built into the OpenGL provider, like EGL, GLES, and others, the more demos will get built unless specified otherwise in the meson setup options.

- Prev

  libvpl-tools-1.5.0

- Next

  OBS-Studio-32.0.4

- Up
- Home