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.

FTP site

The latest version of the Mesa demos can be found on the FTP site.

Git Repository

The Mesa demos git repository can be obtained with:

git clone git://

Or, if you're a developer:

git clone git+ssh://


The Mesa demos can be built with autoconf or CMake.


You'll need glew version 1.5.4 or later and 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 glew glew-devel
yum install freeglut freeglut-devel

And if you're using a Debian based Linux distro you can install these items with:

apt-get install libglew-dev freeglut3-dev


Run ./configure --help to see the options available for building the demos.

Otherwise, just run ./configure ; make to build the demos.


See the CMake documentation for more information about CMake.



cmake .


MinGW cross-compilation

Create a Toolchain.cmake file containing:

# the name of the target operating system

# which compilers to use for C and C++
set (CMAKE_C_COMPILER i586-mingw32msvc-gcc)
set (CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
set (CMAKE_RC_COMPILER i586-mingw32msvc-windres)

# here is the target environment located
set (CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)

# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment

Create a Cache.cmake file containing:

set (GLEW_INCLUDE_DIR "/path/to/glew/include" CACHE PATH "" FORCE)
set (GLEW_glew_LIBRARY "/path/to/glew/lib/libglew32.a" CACHE FILEPATH "" FORCE)

set (GLUT_INCLUDE_DIR "/path/to/glut/include" CACHE PATH "" FORCE)
set (GLUT_glut_LIBRARY "/path/to/glut/lib/libglut32.a" CACHE FILEPATH "" FORCE)

Then do:

cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=/path/to/Toolchain.cmake -C /path/to/Cache.cmake
make install

Read this for more information about CMake and MinGW cross compilation.

The Demos

Look in the src/ directory for these sub-directories, among others:

Getting Help

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.

Reporting Bugs

Bugs in the demos can be reported to the Mesa bug database. Choose Component="Demos" in the drop-down list.