1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8">
5 <title>Mesa Demos Distribution
</title>
6 <style type=
"text/css">
8 pre
{ background: #cccccc; }
16 The Mesa Demos package contains a large number of OpenGL demonstration
21 These programs were previously distributed as the MesaDemos-x.y.z.tar.gz
22 package released in conjunction with the MesaLib-x.y.z.tar.gz package.
23 The demos are separated now since they don't change often and
24 aren't tied to a particular version of Mesa.
28 Note that the Mesa demos should be usable with any OpenGL implementation;
36 The latest version of the Mesa demos can be found on the
37 <a href=
"ftp://ftp.freedesktop.org/pub/mesa/demos/">freedesktop.org FTP
</a>
43 <h1>Git Repository
</h1>
46 The Mesa demos git repository can be obtained with:
49 git clone git://anongit.freedesktop.org/git/mesa/demos
53 Or, if you're a developer:
56 git clone git+ssh://USERNAME@git.freedesktop.org/git/mesa/demos
63 The Mesa demos can be built with autoconf or
<a href=
"http://www.cmake.org/">CMake
</a>.
67 <h2>Prerequisites
</h2>
70 You'll need glut or
<a href=
"http://freeglut.sourceforge.net/">freeglut
</a> (runtime libraries and header files).
74 If you're using an RPM-based Linux distro you can install these items with:
77 yum install freeglut freeglut-devel
81 And if you're using a Debian based Linux distro you can install these items with:
84 apt-get install freeglut3-dev
92 Run
<b>./configure --help
</b> to see the options available for building
97 Otherwise, just run
<b>./configure ; make
</b> to build the demos.
105 See the
<a href=
"http://www.cmake.org/cmake/help/documentation.html">CMake documentation
</a> for more information about CMake.
121 <li>Start the CMake GUI.
</li>
122 <li>Specify where this source is and where to build the binaries.
</li>
123 <li>Click
<i>Configure
</i>.
</li>
124 <li>Specify where GLUT headers and libraries are; specifically via the
125 <b>GLUT_INCLUDE_DIR
</b>, and
<b>GLUT_glut_LIBRARY
</b> variables.
</li>
126 <li>Click
<i>Generate
</i>.
</li>
127 <li>Open the generated
<b>mesademos.sln
</b> Visual Studio solution file and build the target
<b>ALL
</b>.
130 <h3>MinGW cross-compilation
</h3>
133 Create a
<b>Toolchain.cmake
</b> file containing:
136 # the name of the target operating system
137 set (CMAKE_SYSTEM_NAME Windows)
139 # which compilers to use for C and C++
140 set (CMAKE_C_COMPILER i586-mingw32msvc-gcc)
141 set (CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
142 set (CMAKE_RC_COMPILER i586-mingw32msvc-windres)
144 # here is the target environment located
145 set (CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)
147 # adjust the default behaviour of the FIND_XXX() commands:
148 # search headers and libraries in the target environment, search
149 # programs in the host environment
150 set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
151 set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
152 set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
156 Create a
<b>Cache.cmake
</b> file containing:
159 set (GLUT_INCLUDE_DIR
"/path/to/glut/include" CACHE PATH
"" FORCE)
160 set (GLUT_glut_LIBRARY
"/path/to/glut/lib/libglut32.a" CACHE FILEPATH
"" FORCE)
167 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
173 Read
<a href=
"http://www.vtk.org/Wiki/CmakeMingw">this
</a> for more information about CMake and MinGW cross compilation.
180 Look in the
<b>src/
</b> directory for these sub-directories, among others:
183 <li>demos - the original Mesa demos, such as gears, gloss, etc.
</li>
184 <li>redbook - the OpenGL Programming Guide demos
</li>
185 <li>samples- original SGI OpenGL demos
</li>
186 <li>glsl - OpenGL Shading Language demos
</li>
187 <li>gs - Geometry shader demos
</li>
188 <li>xdemos - GLX-based demos
</li>
189 <li>egl - EGL-based demos
</li>
190 <li>wgl - WGL-based demos
</li>
191 <li>fp - fragment program tests
</li>
192 <li>vp - vertex program tests
</li>
193 <li>data - data files used by the demos
</li>
194 <li>perf - performance tests
</li>
195 <li>tests - assorted test programs
</li>
196 <li>objviewer - program to view .obj modes with a skybox
</li>
201 <h1>Getting Help
</h1>
204 If you have trouble building or using the Mesa demos, you can post
205 to the
<a href=
"http://lists.freedesktop.org/mailman/listinfo/mesa-users">
206 Mesa users
</a> mailing list.
210 If your question is especially technical, you can try the
211 to the
<a href=
"http://lists.freedesktop.org/mailman/listinfo/mesa-dev">
212 Mesa dev
</a> mailing list.
216 <h1>Reporting Bugs
</h1>
219 Bugs in the demos can be reported to the
220 <a href=
"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa">
221 Mesa bug database
</a>.
222 Choose
Component=
"Demos" in the drop-down list.