glxinfo: add support for GL_MAX_DUAL_SOURCE_DRAW_BUFFERS query
[mesa-demos.git] / index.html
blobabdf1ebf711c72da189fc758957091ed8b58df91
1 <HTML>
2 <TITLE>Mesa Demos Distribution</TITLE>
3 <STYLE TYPE="text/css">
4 PRE {background-color: #cccccc}
5 </STYLE>
6 <BODY>
8 <H1>Introduction</H1>
9 <p>
10 The Mesa Demos package contains a large number of OpenGL demonstration
11 and test programs.
12 </p>
14 <p>
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.
19 </p>
21 <p>
22 Note that the Mesa demos should be usable with any OpenGL implementation;
23 not just Mesa.
24 </p>
27 <H1>FTP site</H1>
29 <p>
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>
32 site.
33 </p>
37 <H1>Git Repository</H1>
39 <p>
40 The Mesa demos git repository can be obtained with:
41 <pre>
42 git clone git://anongit.freedesktop.org/git/mesa/demos
43 </pre>
45 Or, if you're a developer:
46 <pre>
47 git clone git+ssh://USERNAME@git.freedesktop.org/git/mesa/demos
48 </pre>
50 </p>
53 <H1>Building</H1>
55 <p>
56 The Mesa demos can be built with autoconf or <a href="http://www.cmake.org/">CMake</a>.
57 </p>
60 <h2>Prerequisites</h2>
62 <p>
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).
65 </p>
67 <p>
68 If you're using an RPM-based Linux distro you can install these items with:
69 </p>
70 <pre>
71 yum install glew glew-devel
72 yum install freeglut freeglut-devel
73 </pre>
75 <p>
76 And if you're using a Debian based Linux distro you can install these items with:
77 </p>
78 <pre>
79 apt-get install libglew-dev freeglut3-dev
80 </pre>
84 <H2>Autoconf</H2>
86 <p>
87 Run <b>./configure --help</b> to see the options available for building
88 the demos.
89 </p>
91 <p>
92 Otherwise, just run <b>./configure ; make</b> to build the demos.
93 </p>
97 <H2>CMake</H2>
99 <p>
100 See the <a href="http://www.cmake.org/cmake/help/documentation.html">CMake documentation</a> for more information about CMake.
101 </p>
103 <H3>Unix</H3>
106 Run:
107 </p>
108 <pre>
109 cmake .
110 make
111 </pre>
113 <H3>MSVC</H3>
115 <ul>
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>.
123 </ul>
125 <H3>MinGW cross-compilation</H3>
128 Create a <b>Toolchain.cmake</b> file containing:
129 </p>
130 <pre>
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)
148 </pre>
151 Create a <b>Cache.cmake</b> file containing:
152 </p>
153 <pre>
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)
159 </pre>
162 Then do:
163 </p>
164 <pre>
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
166 make
167 make install
168 </pre>
171 Read <a href="http://www.vtk.org/Wiki/CmakeMingw">this</a> for more information about CMake and MinGW cross compilation.
172 </p>
175 <H1>The Demos</H1>
178 Look in the <b>src/</b> directory for these sub-directories, among others:
179 </p>
180 <ul>
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
195 </ul>
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.
205 </p>
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.
211 </p>
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.
221 </p>
224 </BODY>
225 </HTML>