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
<a href=
"http://glew.sourceforge.net/">glew
</a> version
1.5.4
71 or later and glut or
<a href=
"http://freeglut.sourceforge.net/">freeglut
</a> (runtime libraries and header files).
75 If you're using an RPM-based Linux distro you can install these items with:
78 yum install glew glew-devel
79 yum install freeglut freeglut-devel
83 And if you're using a Debian based Linux distro you can install these items with:
86 apt-get install libglew-dev freeglut3-dev
94 Run
<b>./configure --help
</b> to see the options available for building
99 Otherwise, just run
<b>./configure ; make
</b> to build the demos.
107 See the
<a href=
"http://www.cmake.org/cmake/help/documentation.html">CMake documentation
</a> for more information about CMake.
123 <li>Start the CMake GUI.
</li>
124 <li>Specify where this source is and where to build the binaries.
</li>
125 <li>Click
<i>Configure
</i>.
</li>
126 <li>Specify where GLEW and GLUT headers and libraries are; specifically via the
127 <b>GLEW_INCLUDE_DIR
</b>,
<b>GLEW_glew_LIBRARY
</b>,
<b>GLUT_INCLUDE_DIR
</b>, and
<b>GLUT_glut_LIBRARY
</b> variables.
</li>
128 <li>Click
<i>Generate
</i>.
</li>
129 <li>Open the generated
<b>mesademos.sln
</b> Visual Studio solution file and build the target
<b>ALL
</b>.
132 <h3>MinGW cross-compilation
</h3>
135 Create a
<b>Toolchain.cmake
</b> file containing:
138 # the name of the target operating system
139 set (CMAKE_SYSTEM_NAME Windows)
141 # which compilers to use for C and C++
142 set (CMAKE_C_COMPILER i586-mingw32msvc-gcc)
143 set (CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
144 set (CMAKE_RC_COMPILER i586-mingw32msvc-windres)
146 # here is the target environment located
147 set (CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)
149 # adjust the default behaviour of the FIND_XXX() commands:
150 # search headers and libraries in the target environment, search
151 # programs in the host environment
152 set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
153 set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
154 set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
158 Create a
<b>Cache.cmake
</b> file containing:
161 set (GLEW_INCLUDE_DIR
"/path/to/glew/include" CACHE PATH
"" FORCE)
162 set (GLEW_glew_LIBRARY
"/path/to/glew/lib/libglew32.a" CACHE FILEPATH
"" FORCE)
164 set (GLUT_INCLUDE_DIR
"/path/to/glut/include" CACHE PATH
"" FORCE)
165 set (GLUT_glut_LIBRARY
"/path/to/glut/lib/libglut32.a" CACHE FILEPATH
"" FORCE)
172 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
178 Read
<a href=
"http://www.vtk.org/Wiki/CmakeMingw">this
</a> for more information about CMake and MinGW cross compilation.
185 Look in the
<b>src/
</b> directory for these sub-directories, among others:
188 <li>demos - the original Mesa demos, such as gears, gloss, etc.
</li>
189 <li>redbook - the OpenGL Programming Guide demos
</li>
190 <li>samples- original SGI OpenGL demos
</li>
191 <li>glsl - OpenGL Shading Language demos
</li>
192 <li>gs - Geometry shader demos
</li>
193 <li>xdemos - GLX-based demos
</li>
194 <li>egl - EGL-based demos
</li>
195 <li>wgl - WGL-based demos
</li>
196 <li>fp - fragment program tests
</li>
197 <li>vp - vertex program tests
</li>
198 <li>data - data files used by the demos
</li>
199 <li>perf - performance tests
</li>
200 <li>tests - assorted test programs
</li>
201 <li>objviewer - program to view .obj modes with a skybox
</li>
206 <h1>Getting Help
</h1>
209 If you have trouble building or using the Mesa demos, you can post
210 to the
<a href=
"http://lists.freedesktop.org/mailman/listinfo/mesa-users">
211 Mesa users
</a> mailing list.
215 If your question is especially technical, you can try the
216 to the
<a href=
"http://lists.freedesktop.org/mailman/listinfo/mesa-dev">
217 Mesa dev
</a> mailing list.
221 <h1>Reporting Bugs
</h1>
224 Bugs in the demos can be reported to the
225 <a href=
"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa">
226 Mesa bug database
</a>.
227 Choose
Component=
"Demos" in the drop-down list.