Revert "wglgears: show stereo-option in usage"
[mesa-demos.git] / index.html
blobe88b61b5950382f7c4a94c50f4c8ca75b4395edb
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html lang="en">
3 <head>
4 <meta http-equiv="content-type" content="text/html; charset=utf-8">
5 <title>Mesa Demos Distribution</title>
6 <style type="text/css">
7 <!--
8 pre { background: #cccccc; }
9 -->
10 </style>
11 </head>
12 <body>
14 <h1>Introduction</h1>
15 <p>
16 The Mesa Demos package contains a large number of OpenGL demonstration
17 and test programs.
18 </p>
20 <p>
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.
25 </p>
27 <p>
28 Note that the Mesa demos should be usable with any OpenGL implementation;
29 not just Mesa.
30 </p>
33 <h1>FTP site</h1>
35 <p>
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>
38 site.
39 </p>
43 <h1>Git Repository</h1>
45 <p>
46 The Mesa demos git repository can be obtained with:
47 </p>
48 <pre>
49 git clone git://anongit.freedesktop.org/git/mesa/demos
50 </pre>
52 <p>
53 Or, if you're a developer:
54 </p>
55 <pre>
56 git clone git+ssh://USERNAME@git.freedesktop.org/git/mesa/demos
57 </pre>
60 <h1>Building</h1>
62 <p>
63 The Mesa demos can be built with autoconf or <a href="http://www.cmake.org/">CMake</a>.
64 </p>
67 <h2>Prerequisites</h2>
69 <p>
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).
72 </p>
74 <p>
75 If you're using an RPM-based Linux distro you can install these items with:
76 </p>
77 <pre>
78 yum install glew glew-devel
79 yum install freeglut freeglut-devel
80 </pre>
82 <p>
83 And if you're using a Debian based Linux distro you can install these items with:
84 </p>
85 <pre>
86 apt-get install libglew-dev freeglut3-dev
87 </pre>
91 <h2>Autoconf</h2>
93 <p>
94 Run <b>./configure --help</b> to see the options available for building
95 the demos.
96 </p>
98 <p>
99 Otherwise, just run <b>./configure ; make</b> to build the demos.
100 </p>
104 <h2>CMake</h2>
107 See the <a href="http://www.cmake.org/cmake/help/documentation.html">CMake documentation</a> for more information about CMake.
108 </p>
110 <h3>Unix</h3>
113 Run:
114 </p>
115 <pre>
116 cmake .
117 make
118 </pre>
120 <h3>MSVC</h3>
122 <ul>
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>.
130 </ul>
132 <h3>MinGW cross-compilation</h3>
135 Create a <b>Toolchain.cmake</b> file containing:
136 </p>
137 <pre>
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)
155 </pre>
158 Create a <b>Cache.cmake</b> file containing:
159 </p>
160 <pre>
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)
166 </pre>
169 Then do:
170 </p>
171 <pre>
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
173 make
174 make install
175 </pre>
178 Read <a href="http://www.vtk.org/Wiki/CmakeMingw">this</a> for more information about CMake and MinGW cross compilation.
179 </p>
182 <h1>The Demos</h1>
185 Look in the <b>src/</b> directory for these sub-directories, among others:
186 </p>
187 <ul>
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>
202 </ul>
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.
212 </p>
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.
218 </p>
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.
228 </p>
231 </body>
232 </html>