Use glad instead of GLEW.
[mesa-demos.git] / index.html
blob0bd549d3427c73686397dafe8c7460ae27451121
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 glut or <a href="http://freeglut.sourceforge.net/">freeglut</a> (runtime libraries and header files).
71 </p>
73 <p>
74 If you're using an RPM-based Linux distro you can install these items with:
75 </p>
76 <pre>
77 yum install freeglut freeglut-devel
78 </pre>
80 <p>
81 And if you're using a Debian based Linux distro you can install these items with:
82 </p>
83 <pre>
84 apt-get install freeglut3-dev
85 </pre>
89 <h2>Autoconf</h2>
91 <p>
92 Run <b>./configure --help</b> to see the options available for building
93 the demos.
94 </p>
96 <p>
97 Otherwise, just run <b>./configure ; make</b> to build the demos.
98 </p>
102 <h2>CMake</h2>
105 See the <a href="http://www.cmake.org/cmake/help/documentation.html">CMake documentation</a> for more information about CMake.
106 </p>
108 <h3>Unix</h3>
111 Run:
112 </p>
113 <pre>
114 cmake .
115 make
116 </pre>
118 <h3>MSVC</h3>
120 <ul>
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>.
128 </ul>
130 <h3>MinGW cross-compilation</h3>
133 Create a <b>Toolchain.cmake</b> file containing:
134 </p>
135 <pre>
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)
153 </pre>
156 Create a <b>Cache.cmake</b> file containing:
157 </p>
158 <pre>
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)
161 </pre>
164 Then do:
165 </p>
166 <pre>
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
168 make
169 make install
170 </pre>
173 Read <a href="http://www.vtk.org/Wiki/CmakeMingw">this</a> for more information about CMake and MinGW cross compilation.
174 </p>
177 <h1>The Demos</h1>
180 Look in the <b>src/</b> directory for these sub-directories, among others:
181 </p>
182 <ul>
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>
197 </ul>
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.
207 </p>
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.
213 </p>
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.
223 </p>
226 </body>
227 </html>