2 <TITLE>Mesa Demos Distribution
</TITLE>
3 <STYLE TYPE=
"text/css">
4 PRE {background-color: #cccccc}
10 The Mesa Demos package contains a large number of OpenGL demonstration
15 These programs were previously distributed as the MesaDemos-x.y.z.tar.gz
16 package released in conjunction with the MesaLib-x.y.z.tar.gz package.
17 The demos are separated now since they don't change often and
18 aren't tied to a particular version of Mesa.
22 Note that the Mesa demos should be usable with any OpenGL implementation;
30 The latest version of the Mesa demos can be found on the
31 <a href=
"ftp://ftp.freedesktop.org/pub/mesa/demos/">freedesktop.org FTP
</a>
37 <H1>Git Repository
</H1>
40 The Mesa demos git repository can be obtained with:
42 git clone git://anongit.freedesktop.org/git/mesa/demos
45 Or, if you're a developer:
47 git clone git+ssh://USERNAME@git.freedesktop.org/git/mesa/demos
56 The Mesa demos can be built with autoconf or
<a href=
"http://www.cmake.org/">CMake
</a>.
60 <h2>Prerequisites
</h2>
63 You'll need
<a href=
"http://glew.sourceforge.net/">glew
</a> version
1.5.4
64 or later and glut or
<a href=
"http://freeglut.sourceforge.net/">freeglut
</a> (runtime libraries and header files).
68 If you're using an RPM-based Linux distro you can install these items with:
71 yum install glew glew-devel
72 yum install freeglut freeglut-devel
76 And if you're using a Debian based Linux distro you can install these items with:
79 apt-get install libglew-dev freeglut3-dev
87 Run
<b>./configure --help
</b> to see the options available for building
92 Otherwise, just run
<b>./configure ; make
</b> to build the demos.
100 See the
<a href=
"http://www.cmake.org/cmake/help/documentation.html">CMake documentation
</a> for more information about CMake.
116 <li>Start the CMake GUI.
117 <li>Specify where this source is and where to build the binaries.
118 <li>Click
<i>Configure
</i>.
119 <li>Specify where GLEW and GLUT headers and libraries are; specifically via the
120 <b>GLEW_INCLUDE_DIR
</b>,
<b>GLEW_glew_LIBRARY
</b>,
<b>GLUT_INCLUDE_DIR
</b>, and
<b>GLUT_glut_LIBRARY
</b> variables.
121 <li>Click
<i>Generate
</i>.
122 <li>Open the generated
<b>mesademos.sln
</b> Visual Studio solution file and build the target
<b>ALL
</b>.
125 <H3>MinGW cross-compilation
</H3>
128 Create a
<b>Toolchain.cmake
</b> file containing:
131 # the name of the target operating system
132 set (CMAKE_SYSTEM_NAME Windows)
134 # which compilers to use for C and C++
135 set (CMAKE_C_COMPILER i586-mingw32msvc-gcc)
136 set (CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
137 set (CMAKE_RC_COMPILER i586-mingw32msvc-windres)
139 # here is the target environment located
140 set (CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)
142 # adjust the default behaviour of the FIND_XXX() commands:
143 # search headers and libraries in the target environment, search
144 # programs in the host environment
145 set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
146 set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
147 set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
151 Create a
<b>Cache.cmake
</b> file containing:
154 set (GLEW_INCLUDE_DIR
"/path/to/glew/include" CACHE PATH
"" FORCE)
155 set (GLEW_glew_LIBRARY
"/path/to/glew/lib/libglew32.a" CACHE FILEPATH
"" FORCE)
157 set (GLUT_INCLUDE_DIR
"/path/to/glut/include" CACHE PATH
"" FORCE)
158 set (GLUT_glut_LIBRARY
"/path/to/glut/lib/libglut32.a" CACHE FILEPATH
"" FORCE)
165 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
171 Read
<a href=
"http://www.vtk.org/Wiki/CmakeMingw">this
</a> for more information about CMake and MinGW cross compilation.
178 Look in the
<b>src/
</b> directory for these sub-directories, among others:
181 <li>demos - the original Mesa demos, such as gears, gloss, etc.
182 <li>redbook - the OpenGL Programming Guide demos
183 <li>samples- original SGI OpenGL demos
184 <li>glsl - OpenGL Shading Language demos
185 <li>gs - Geometry shader demos
186 <li>xdemos - GLX-based demos
187 <li>egl - EGL-based demos
188 <li>wgl - WGL-based demos
189 <li>fp - fragment program tests
190 <li>vp - vertex program tests
191 <li>data - data files used by the demos
192 <li>perf - performance tests
193 <li>tests - assorted test programs
194 <li>objviewer - program to view .obj modes with a skybox
199 <H1>Getting Help
</H1>
202 If you have trouble building or using the Mesa demos, you can post
203 to the
<a href=
"http://lists.freedesktop.org/mailman/listinfo/mesa-users">
204 Mesa users
</a> mailing list.
208 If your question is especially technical, you can try the
209 to the
<a href=
"http://lists.freedesktop.org/mailman/listinfo/mesa-dev">
210 Mesa dev
</a> mailing list.
214 <H1>Reporting Bugs
</H1>
217 Bugs in the demos can be reported to the
218 <a href=
"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa">
219 Mesa bug database
</a>.
220 Choose
Component=
"Demos" in the drop-down list.