summaryrefslogtreecommitdiff
path: root/index.html
blob: 0bd549d3427c73686397dafe8c7460ae27451121 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <title>Mesa Demos Distribution</title>
  <style type="text/css">
    <!--
    pre { background: #cccccc; }
	-->
  </style>
</head>
<body>

<h1>Introduction</h1>
<p>
The Mesa Demos package contains a large number of OpenGL demonstration
and test programs.
</p>

<p>
These programs were previously distributed as the MesaDemos-x.y.z.tar.gz
package released in conjunction with the MesaLib-x.y.z.tar.gz package.
The demos are separated now since they don't change often and
aren't tied to a particular version of Mesa.
</p>

<p>
Note that the Mesa demos should be usable with any OpenGL implementation;
not just Mesa.
</p>


<h1>FTP site</h1>

<p>
The latest version of the Mesa demos can be found on the
<a href="ftp://ftp.freedesktop.org/pub/mesa/demos/">freedesktop.org FTP</a>
site.
</p>



<h1>Git Repository</h1>

<p>
The Mesa demos git repository can be obtained with:
</p>
<pre>
git clone git://anongit.freedesktop.org/git/mesa/demos
</pre>

<p>
Or, if you're a developer:
</p>
<pre>
git clone git+ssh://USERNAME@git.freedesktop.org/git/mesa/demos
</pre>


<h1>Building</h1>

<p>
The Mesa demos can be built with autoconf or <a href="http://www.cmake.org/">CMake</a>.
</p>


<h2>Prerequisites</h2>

<p>
You'll need glut or <a href="http://freeglut.sourceforge.net/">freeglut</a> (runtime libraries and header files).
</p>

<p>
If you're using an RPM-based Linux distro you can install these items with:
</p>
<pre>
yum install freeglut freeglut-devel
</pre>

<p>
And if you're using a Debian based Linux distro you can install these items with:
</p>
<pre>
apt-get install freeglut3-dev
</pre>



<h2>Autoconf</h2>

<p>
Run <b>./configure --help</b> to see the options available for building
the demos.
</p>

<p>
Otherwise, just run <b>./configure ; make</b> to build the demos.
</p>



<h2>CMake</h2>

<p>
See the <a href="http://www.cmake.org/cmake/help/documentation.html">CMake documentation</a> for more information about CMake.
</p>

<h3>Unix</h3>

<p>
Run:
</p>
<pre>
cmake .
make
</pre>

<h3>MSVC</h3>

<ul>
  <li>Start the CMake GUI.</li>
  <li>Specify where this source is and where to build the binaries.</li>
  <li>Click <i>Configure</i>.</li>
  <li>Specify where GLUT headers and libraries are; specifically via the 
  <b>GLUT_INCLUDE_DIR</b>, and <b>GLUT_glut_LIBRARY</b> variables.</li>
  <li>Click <i>Generate</i>.</li>
  <li>Open the generated <b>mesademos.sln</b> Visual Studio solution file and build the target <b>ALL</b>.
</ul>

<h3>MinGW cross-compilation</h3>

<p>
Create a <b>Toolchain.cmake</b> file containing:
</p>
<pre>
# the name of the target operating system
set (CMAKE_SYSTEM_NAME Windows)

# which compilers to use for C and C++
set (CMAKE_C_COMPILER i586-mingw32msvc-gcc)
set (CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
set (CMAKE_RC_COMPILER i586-mingw32msvc-windres)

# here is the target environment located
set (CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)

# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
</pre>

<p>
Create a <b>Cache.cmake</b> file containing:
</p>
<pre>
set (GLUT_INCLUDE_DIR "/path/to/glut/include" CACHE PATH "" FORCE)
set (GLUT_glut_LIBRARY "/path/to/glut/lib/libglut32.a" CACHE FILEPATH "" FORCE)
</pre>

<p>
Then do:
</p>
<pre>
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
make
make install
</pre>

<p>
Read <a href="http://www.vtk.org/Wiki/CmakeMingw">this</a> for more information about CMake and MinGW cross compilation.
</p>


<h1>The Demos</h1>

<p>
Look in the <b>src/</b> directory for these sub-directories, among others:
</p>
<ul>
  <li>demos - the original Mesa demos, such as gears, gloss, etc.</li>
  <li>redbook - the OpenGL Programming Guide demos</li>
  <li>samples- original SGI OpenGL demos</li>
  <li>glsl - OpenGL Shading Language demos</li>
  <li>gs - Geometry shader demos</li>
  <li>xdemos - GLX-based demos</li>
  <li>egl - EGL-based demos</li>
  <li>wgl - WGL-based demos</li>
  <li>fp - fragment program tests</li>
  <li>vp - vertex program tests</li>
  <li>data - data files used by the demos</li>
  <li>perf - performance tests</li>
  <li>tests - assorted test programs</li>
  <li>objviewer - program to view .obj modes with a skybox</li>
</ul>



<h1>Getting Help</h1>

<p>
If you have trouble building or using the Mesa demos, you can post
to the<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-users">
Mesa users</a> mailing list.
</p>

<p>
If your question is especially technical, you can try the
to the<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev">
Mesa dev</a> mailing list.
</p>


<h1>Reporting Bugs</h1>

<p>
Bugs in the demos can be reported to the
<a href="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa">
Mesa bug database</a>.
Choose Component="Demos" in the drop-down list.
</p>


</body>
</html>