The Mesa Demos package contains a large number of OpenGL demonstration and test programs.
These programs were previously distributed as the MesaDemos-x.y.z.tar.gz package released in conjunction with the MesaLib-x.y.z.tar.gz package. The demos are separated now since they don't change often and aren't tied to a particular version of Mesa.
Note that the Mesa demos should be usable with any OpenGL implementation; not just Mesa.
The latest version of the Mesa demos can be found on the mesa3d.org archives site.
The Mesa demos git repository can be obtained with:
$ git clone https://gitlab.freedesktop.org/mesa/demos.git
The Mesa demos can be built with Meson.
You'll need GLUT or FreeGLUT (runtime libraries and header files).
If you're using an RPM-based Linux distro you can install these items with:
$ yum install freeglut freeglut-devel
And if you're using a Debian based Linux distro you can install these items with:
$ apt-get install freeglut3-dev
For Wayland support, wayland-protocols and wayland-scanner must be available.
Run meson configure to see the options available for building the demos.
Otherwise, just run meson build-dir; meson compile -C build-dir to build the demos.
See the Meson documentation for more information about Meson.
Create a cross-file file containing:
[binaries]
c = '/usr/bin/x86_64-w64-mingw32-gcc'
cpp = '/usr/bin/x86_64-w64-mingw32-g++'
ar = '/usr/bin/x86_64-w64-mingw32-ar'
strip = '/usr/bin/x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
exe_wrapper = 'wine'
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'i686'
endian = 'little'
Then do:
$ meson --prefix=/path/to/install --cross-file /path/to/cross-file build-dir
$ meson compile -C build-dir
$ meson install -C build-dir
Look in the src/ directory for these sub-directories, among others:
- demos: the original Mesa demos, such as gears, gloss, etc.
- redbook: the OpenGL Programming Guide demos
- samples: original SGI OpenGL demos
- glsl: OpenGL Shading Language demos
- xdemos: GLX-based demos
- egl: EGL-based demos
- wgl: WGL-based demos
- fp: fragment program tests
- vp: vertex program tests
- data: data files used by the demos
- tests: assorted test programs
- objviewer: program to view .obj modes with a skybox
- vulkan: Vulkan demos
If you have trouble building or using the Mesa demos, you can post to the Mesa users mailing list.
If your question is especially technical, you can try the to the Mesa dev mailing list.
Bugs in the demos can be reported to the Mesa demos issue tracker.