Andreas Boll | ecd5c7c | 2012-06-12 09:05:03 +0200 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta http-equiv="content-type" content="text/html; charset=utf-8"> |
| 5 | <title>Mesa FAQ</title> |
| 6 | <link rel="stylesheet" type="text/css" href="mesa.css"> |
| 7 | </head> |
| 8 | <body> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 9 | |
Andreas Boll | b5da52a | 2012-09-18 18:57:02 +0200 | [diff] [blame] | 10 | <div class="header"> |
| 11 | <h1>The Mesa 3D Graphics Library</h1> |
| 12 | </div> |
| 13 | |
| 14 | <iframe src="contents.html"></iframe> |
| 15 | <div class="content"> |
| 16 | |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 17 | <center> |
| 18 | <h1>Mesa Frequently Asked Questions</h1> |
Andreas Boll | b534c39 | 2012-10-05 23:14:10 +0200 | [diff] [blame] | 19 | Last updated: 9 October 2012 |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 20 | </center> |
| 21 | |
| 22 | <br> |
| 23 | <br> |
| 24 | <h2>Index</h2> |
| 25 | <a href="#part1">1. High-level Questions and Answers</a> |
| 26 | <br> |
| 27 | <a href="#part2">2. Compilation and Installation Problems</a> |
| 28 | <br> |
| 29 | <a href="#part3">3. Runtime / Rendering Problems</a> |
| 30 | <br> |
| 31 | <a href="#part4">4. Developer Questions</a> |
| 32 | <br> |
| 33 | <br> |
| 34 | <br> |
| 35 | |
| 36 | |
| 37 | |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 38 | <h1 id="part1">1. High-level Questions and Answers</h1> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 39 | |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 40 | <h2>1.1 What is Mesa?</h2> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 41 | <p> |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 42 | Mesa is an open-source implementation of the OpenGL specification. |
Brian Paul | a376e33 | 2003-03-30 16:54:36 +0000 | [diff] [blame] | 43 | OpenGL is a programming library for writing interactive 3D applications. |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 44 | See the <a href="http://www.opengl.org/">OpenGL website</a> for more |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 45 | information. |
| 46 | </p> |
| 47 | <p> |
Andreas Boll | 5abb1f8 | 2012-09-19 18:22:37 +0200 | [diff] [blame] | 48 | Mesa 9.x supports the OpenGL 3.1 specification. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 49 | </p> |
| 50 | |
| 51 | |
| 52 | <h2>1.2 Does Mesa support/use graphics hardware?</h2> |
| 53 | <p> |
Brian Paul | 7e4cc1c | 2005-10-24 23:33:27 +0000 | [diff] [blame] | 54 | Yes. Specifically, Mesa serves as the OpenGL core for the open-source DRI |
Andreas Boll | 8504f18 | 2012-09-20 16:23:15 +0200 | [diff] [blame] | 55 | drivers for X.org. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 56 | </p> |
Andreas Boll | 8504f18 | 2012-09-20 16:23:15 +0200 | [diff] [blame] | 57 | <ul> |
| 58 | <li>See the <a href="http://dri.freedesktop.org/">DRI website</a> |
| 59 | for more information.</li> |
| 60 | <li>See <a href="http://intellinuxgraphics.org">intellinuxgraphics.org</a> |
| 61 | for more information about Intel drivers.</li> |
| 62 | <li>See <a href="http://nouveau.freedesktop.org">nouveau.freedesktop.org</a> |
| 63 | for more information about Nouveau drivers.</li> |
| 64 | <li>See <a href="http://www.x.org/wiki/RadeonFeature">www.x.org/wiki/RadeonFeature</a> |
| 65 | for more information about Radeon drivers.</li> |
| 66 | </ul> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 67 | |
Brian Paul | 65b7905 | 2004-11-22 17:49:15 +0000 | [diff] [blame] | 68 | <h2>1.3 What purpose does Mesa serve today?</h2> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 69 | <p> |
Brian Paul | a376e33 | 2003-03-30 16:54:36 +0000 | [diff] [blame] | 70 | Hardware-accelerated OpenGL implementations are available for most popular |
| 71 | operating systems today. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 72 | Still, Mesa serves at least these purposes: |
| 73 | </p> |
| 74 | <ul> |
Andreas Boll | 8504f18 | 2012-09-20 16:23:15 +0200 | [diff] [blame] | 75 | <li>Mesa is used as the core of the open-source X.org DRI |
Brian Paul | 7e4cc1c | 2005-10-24 23:33:27 +0000 | [diff] [blame] | 76 | hardware drivers. |
Brian Paul | a376e33 | 2003-03-30 16:54:36 +0000 | [diff] [blame] | 77 | </li> |
| 78 | <li>Mesa is quite portable and allows OpenGL to be used on systems |
| 79 | that have no other OpenGL solution. |
| 80 | </li> |
| 81 | <li>Software rendering with Mesa serves as a reference for validating the |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 82 | hardware drivers. |
Brian Paul | a376e33 | 2003-03-30 16:54:36 +0000 | [diff] [blame] | 83 | </li> |
| 84 | <li>A software implementation of OpenGL is useful for experimentation, |
| 85 | such as testing new rendering techniques. |
| 86 | </li> |
| 87 | <li>Mesa can render images with deep color channels: 16-bit integer |
| 88 | and 32-bit floating point color channels are supported. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 89 | This capability is only now appearing in hardware. |
Brian Paul | a376e33 | 2003-03-30 16:54:36 +0000 | [diff] [blame] | 90 | </li> |
| 91 | <li>Mesa's internal limits (max lights, clip planes, texture size, etc) can be |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 92 | changed for special needs (hardware limits are hard to overcome). |
Brian Paul | a376e33 | 2003-03-30 16:54:36 +0000 | [diff] [blame] | 93 | </li> |
| 94 | </ul> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 95 | |
Brian Paul | 65b7905 | 2004-11-22 17:49:15 +0000 | [diff] [blame] | 96 | |
Andreas Boll | 5abb1f8 | 2012-09-19 18:22:37 +0200 | [diff] [blame] | 97 | <h2>1.4 What's the difference between "Stand-Alone" Mesa and the DRI drivers?</h2> |
Brian Paul | 65b7905 | 2004-11-22 17:49:15 +0000 | [diff] [blame] | 98 | <p> |
| 99 | <em>Stand-alone Mesa</em> is the original incarnation of Mesa. |
Brian Paul | 7e4cc1c | 2005-10-24 23:33:27 +0000 | [diff] [blame] | 100 | On systems running the X Window System it does all its rendering through |
| 101 | the Xlib API: |
Andreas Boll | df2be22 | 2012-06-12 09:05:22 +0200 | [diff] [blame] | 102 | </p> |
Brian Paul | 65b7905 | 2004-11-22 17:49:15 +0000 | [diff] [blame] | 103 | <ul> |
| 104 | <li>The GLX API is supported, but it's really just an emulation of the |
| 105 | real thing. |
| 106 | <li>The GLX wire protocol is not supported and there's no OpenGL extension |
| 107 | loaded by the X server. |
| 108 | <li>There is no hardware acceleration. |
| 109 | <li>The OpenGL library, libGL.so, contains everything (the programming API, |
| 110 | the GLX functions and all the rendering code). |
| 111 | </ul> |
Brian Paul | 65b7905 | 2004-11-22 17:49:15 +0000 | [diff] [blame] | 112 | <p> |
| 113 | Alternately, Mesa acts as the core for a number of OpenGL hardware drivers |
| 114 | within the DRI (Direct Rendering Infrastructure): |
| 115 | <ul> |
| 116 | <li>The libGL.so library provides the GL and GLX API functions, a GLX |
| 117 | protocol encoder, and a device driver loader. |
| 118 | <li>The device driver modules (such as r200_dri.so) contain a built-in |
| 119 | copy of the core Mesa code. |
| 120 | <li>The X server loads the GLX module. |
| 121 | The GLX module decodes incoming GLX protocol and dispatches the commands |
| 122 | to a rendering module. |
| 123 | For the DRI, this module is basically a software Mesa renderer. |
| 124 | </ul> |
| 125 | |
| 126 | |
| 127 | |
| 128 | <h2>1.5 How do I upgrade my DRI installation to use a new Mesa release?</h2> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 129 | <p> |
Brian Paul | 7e4cc1c | 2005-10-24 23:33:27 +0000 | [diff] [blame] | 130 | This wasn't easy in the past. |
| 131 | Now, the DRI drivers are included in the Mesa tree and can be compiled |
| 132 | separately from the X server. |
| 133 | Just follow the Mesa <a href="install.html">compilation instructions</a>. |
Brian Paul | 824a4fc | 2003-08-06 19:05:26 +0000 | [diff] [blame] | 134 | </p> |
| 135 | |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 136 | |
Brian Paul | 65b7905 | 2004-11-22 17:49:15 +0000 | [diff] [blame] | 137 | <h2>1.6 Are there other open-source implementations of OpenGL?</h2> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 138 | <p> |
Andreas Boll | a73c59b | 2012-09-18 19:31:28 +0200 | [diff] [blame] | 139 | Yes, SGI's <a href="http://oss.sgi.com/projects/ogl-sample/index.html"> |
Nathan Kidd | 0691b37 | 2014-01-03 16:44:00 -0700 | [diff] [blame] | 140 | OpenGL Sample Implementation (SI)</a> is available. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 141 | The SI was written during the time that OpenGL was originally designed. |
| 142 | Unfortunately, development of the SI has stagnated. |
| 143 | Mesa is much more up to date with modern features and extensions. |
| 144 | </p> |
Brian Paul | 186d4d8 | 2004-04-27 12:55:08 +0000 | [diff] [blame] | 145 | |
| 146 | <p> |
Andreas Boll | 8504f18 | 2012-09-20 16:23:15 +0200 | [diff] [blame] | 147 | <a href="http://sourceforge.net/projects/ogl-es/">Vincent</a> is |
Brian Paul | 186d4d8 | 2004-04-27 12:55:08 +0000 | [diff] [blame] | 148 | an open-source implementation of OpenGL ES for mobile devices. |
| 149 | |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 150 | <p> |
Andreas Boll | a73c59b | 2012-09-18 19:31:28 +0200 | [diff] [blame] | 151 | <a href="http://www.dsbox.com/minigl.html">miniGL</a> |
Brian Paul | 7df4f95 | 2003-11-25 21:13:26 +0000 | [diff] [blame] | 152 | is a subset of OpenGL for PalmOS devices. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 153 | |
Brian Paul | 7df4f95 | 2003-11-25 21:13:26 +0000 | [diff] [blame] | 154 | <p> |
Andreas Boll | 8504f18 | 2012-09-20 16:23:15 +0200 | [diff] [blame] | 155 | <a href="http://bellard.org/TinyGL/">TinyGL</a> |
Andreas Boll | a73c59b | 2012-09-18 19:31:28 +0200 | [diff] [blame] | 156 | is a subset of OpenGL. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 157 | </p> |
Brian Paul | 7df4f95 | 2003-11-25 21:13:26 +0000 | [diff] [blame] | 158 | |
| 159 | <p> |
Andreas Boll | 8504f18 | 2012-09-20 16:23:15 +0200 | [diff] [blame] | 160 | <a href="http://sourceforge.net/projects/softgl/">SoftGL</a> |
Brian Paul | 7df4f95 | 2003-11-25 21:13:26 +0000 | [diff] [blame] | 161 | is an OpenGL subset for mobile devices. |
| 162 | </p> |
| 163 | |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 164 | <p> |
Andreas Boll | a73c59b | 2012-09-18 19:31:28 +0200 | [diff] [blame] | 165 | <a href="http://chromium.sourceforge.net/">Chromium</a> |
Brian Paul | acbc1e0 | 2003-11-26 18:10:31 +0000 | [diff] [blame] | 166 | isn't a conventional OpenGL implementation (it's layered upon OpenGL), |
| 167 | but it does export the OpenGL API. It allows tiled rendering, sort-last |
| 168 | rendering, etc. |
| 169 | </p> |
| 170 | |
Brian Paul | acbc1e0 | 2003-11-26 18:10:31 +0000 | [diff] [blame] | 171 | <p> |
Andreas Boll | a73c59b | 2012-09-18 19:31:28 +0200 | [diff] [blame] | 172 | <a href="http://www.ticalc.org/archives/files/fileinfo/361/36173.html">ClosedGL</a> |
| 173 | is an OpenGL subset library for TI graphing calculators. |
Brian Paul | 0c65604 | 2006-06-08 19:59:41 +0000 | [diff] [blame] | 174 | </p> |
| 175 | |
| 176 | <p> |
Brian Paul | acbc1e0 | 2003-11-26 18:10:31 +0000 | [diff] [blame] | 177 | There may be other open OpenGL implementations, but Mesa is the most |
| 178 | popular and feature-complete. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 179 | </p> |
| 180 | |
Brian Paul | 65b7905 | 2004-11-22 17:49:15 +0000 | [diff] [blame] | 181 | |
| 182 | |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 183 | <br> |
| 184 | <br> |
| 185 | |
| 186 | |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 187 | <h1 id="part2">2. Compilation and Installation Problems</h1> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 188 | |
| 189 | |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 190 | <h2>2.1 What's the easiest way to install Mesa?</h2> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 191 | <p> |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 192 | If you're using a Linux-based system, your distro CD most likely already |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 193 | has Mesa packages (like RPM or DEB) which you can easily install. |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 194 | </p> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 195 | |
| 196 | |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 197 | <h2>2.2 I get undefined symbols such as bgnpolygon, v3f, etc...</h2> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 198 | <p> |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 199 | You're application is written in IRIS GL, not OpenGL. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 200 | IRIS GL was the predecessor to OpenGL and is a different thing (almost) |
| 201 | entirely. |
| 202 | Mesa's not the solution. |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 203 | </p> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 204 | |
| 205 | |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 206 | <h2>2.3 Where is the GLUT library?</h2> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 207 | <p> |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 208 | GLUT (OpenGL Utility Toolkit) is no longer in the separate MesaGLUT-x.y.z.tar.gz file. |
José Fonseca | 9a7f84d | 2011-07-14 17:28:52 +0100 | [diff] [blame] | 209 | If you don't already have GLUT installed, you should grab |
| 210 | <a href="http://freeglut.sourceforge.net/">freeglut</a>. |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 211 | </p> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 212 | |
| 213 | |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 214 | <h2>2.4 Where is the GLw library?</h2> |
Kenneth Graunke | c548192 | 2011-08-05 16:59:04 -0700 | [diff] [blame] | 215 | <p> |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 216 | GLw (OpenGL widget library) is now available from a separate <a href="http://cgit.freedesktop.org/mesa/glw/">git repository</a>. Unless you're using very old Xt/Motif applications with OpenGL, you shouldn't need it. |
| 217 | </p> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 218 | |
Kenneth Graunke | c548192 | 2011-08-05 16:59:04 -0700 | [diff] [blame] | 219 | |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 220 | <h2>2.5 What's the proper place for the libraries and headers?</h2> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 221 | <p> |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 222 | On Linux-based systems you'll want to follow the |
Andreas Boll | a73c59b | 2012-09-18 19:31:28 +0200 | [diff] [blame] | 223 | <a href="http://oss.sgi.com/projects/ogl-sample/ABI/index.html">Linux ABI</a> standard. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 224 | Basically you'll want the following: |
| 225 | </p> |
| 226 | <ul> |
| 227 | <li>/usr/include/GL/gl.h - the main OpenGL header |
| 228 | </li><li>/usr/include/GL/glu.h - the OpenGL GLU (utility) header |
| 229 | </li><li>/usr/include/GL/glx.h - the OpenGL GLX header |
| 230 | </li><li>/usr/include/GL/glext.h - the OpenGL extensions header |
| 231 | </li><li>/usr/include/GL/glxext.h - the OpenGL GLX extensions header |
| 232 | </li><li>/usr/include/GL/osmesa.h - the Mesa off-screen rendering header |
| 233 | </li><li>/usr/lib/libGL.so - a symlink to libGL.so.1 |
| 234 | </li><li>/usr/lib/libGL.so.1 - a symlink to libGL.so.1.xyz |
| 235 | </li><li>/usr/lib/libGL.so.xyz - the actual OpenGL/Mesa library. xyz denotes the |
| 236 | Mesa version number. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 237 | </li></ul> |
| 238 | <p> |
Andreas Boll | b534c39 | 2012-10-05 23:14:10 +0200 | [diff] [blame] | 239 | When configuring Mesa, there are three autoconf options that affect the install |
| 240 | location that you should take care with: <code>--prefix</code>, |
| 241 | <code>--libdir</code>, and <code>--with-dri-driverdir</code>. To install Mesa |
| 242 | into the system location where it will be available for all programs to use, set |
| 243 | <code>--prefix=/usr</code>. Set <code>--libdir</code> to where your Linux |
| 244 | distribution installs system libraries, usually either <code>/usr/lib</code> or |
| 245 | <code>/usr/lib64</code>. Set <code>--with-dri-driverdir</code> to the directory |
| 246 | where your Linux distribution installs DRI drivers. To find your system's DRI |
| 247 | driver directory, try executing <code>find /usr -type d -name dri</code>. For |
| 248 | example, if the <code>find</code> command listed <code>/usr/lib64/dri</code>, |
| 249 | then set <code>--with-dri-driverdir=/usr/lib64/dri</code>. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 250 | </p> |
| 251 | <p> |
Andreas Boll | b534c39 | 2012-10-05 23:14:10 +0200 | [diff] [blame] | 252 | After determining the correct values for the install location, configure Mesa |
| 253 | with <code>./configure --prefix=/usr --libdir=xxx --with-dri-driverdir=xxx</code> |
| 254 | and then install with <code>sudo make install</code>. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 255 | </p> |
| 256 | <br> |
| 257 | <br> |
| 258 | |
| 259 | |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 260 | <h1 id="part3">3. Runtime / Rendering Problems</h1> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 261 | |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 262 | <h2>3.1 Rendering is slow / why isn't my graphics hardware being used?</h2> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 263 | <p> |
Andreas Boll | b534c39 | 2012-10-05 23:14:10 +0200 | [diff] [blame] | 264 | If Mesa can't use its hardware accelerated drivers it falls back on one of its software renderers. |
| 265 | (eg. classic swrast, softpipe or llvmpipe) |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 266 | </p> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 267 | <p> |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 268 | You can run the <code>glxinfo</code> program to learn about your OpenGL |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 269 | library. |
Andreas Boll | b534c39 | 2012-10-05 23:14:10 +0200 | [diff] [blame] | 270 | Look for the <code>OpenGL vendor</code> and <code>OpenGL renderer</code> values. |
| 271 | That will identify who's OpenGL library with which driver you're using and what sort of |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 272 | hardware it has detected. |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 273 | </p> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 274 | <p> |
Andreas Boll | b534c39 | 2012-10-05 23:14:10 +0200 | [diff] [blame] | 275 | If you're using a hardware accelerated driver you want <code>direct rendering: Yes</code>. |
| 276 | </p> |
| 277 | <p> |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 278 | If your DRI-based driver isn't working, go to the |
Andreas Boll | 8504f18 | 2012-09-20 16:23:15 +0200 | [diff] [blame] | 279 | <a href="http://dri.freedesktop.org/">DRI website</a> for trouble-shooting information. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 280 | </p> |
| 281 | |
| 282 | |
| 283 | <h2>3.2 I'm seeing errors in depth (Z) buffering. Why?</h2> |
| 284 | <p> |
| 285 | Make sure the ratio of the far to near clipping planes isn't too great. |
| 286 | Look |
Andreas Boll | a73c59b | 2012-09-18 19:31:28 +0200 | [diff] [blame] | 287 | <a href="http://www.opengl.org/resources/faq/technical/depthbuffer.htm#0040">here</a> |
| 288 | for details. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 289 | </p> |
| 290 | <p> |
| 291 | Mesa uses a 16-bit depth buffer by default which is smaller and faster |
| 292 | to clear than a 32-bit buffer but not as accurate. |
| 293 | If you need a deeper you can modify the parameters to |
| 294 | <code> glXChooseVisual</code> in your code. |
| 295 | </p> |
| 296 | |
| 297 | |
| 298 | <h2>3.3 Why Isn't depth buffering working at all?</h2> |
| 299 | <p> |
| 300 | Be sure you're requesting a depth buffered-visual. If you set the MESA_DEBUG |
| 301 | environment variable it will warn you about trying to enable depth testing |
| 302 | when you don't have a depth buffer. |
| 303 | </p> |
| 304 | <p>Specifically, make sure <code>glutInitDisplayMode</code> is being called |
| 305 | with <code>GLUT_DEPTH</code> or <code>glXChooseVisual</code> is being |
| 306 | called with a non-zero value for GLX_DEPTH_SIZE. |
| 307 | </p> |
| 308 | <p>This discussion applies to stencil buffers, accumulation buffers and |
| 309 | alpha channels too. |
| 310 | </p> |
| 311 | |
| 312 | |
| 313 | <h2>3.4 Why does glGetString() always return NULL?</h2> |
| 314 | <p> |
| 315 | Be sure you have an active/current OpenGL rendering context before |
| 316 | calling glGetString. |
| 317 | </p> |
| 318 | |
| 319 | |
| 320 | <h2>3.5 GL_POINTS and GL_LINES don't touch the right pixels</h2> |
| 321 | <p> |
| 322 | If you're trying to draw a filled region by using GL_POINTS or GL_LINES |
| 323 | and seeing holes or gaps it's because of a float-to-int rounding problem. |
| 324 | But this is not a bug. |
| 325 | See Appendix H of the OpenGL Programming Guide - "OpenGL Correctness Tips". |
| 326 | Basically, applying a translation of (0.375, 0.375, 0.0) to your coordinates |
| 327 | will fix the problem. |
| 328 | </p> |
| 329 | |
Tom Fogal | 9a8781b | 2009-08-13 19:51:57 -0600 | [diff] [blame] | 330 | <h2>3.6 How can I change the maximum framebuffer size in Mesa's |
| 331 | <tt>swrast</tt> backend?</h2> |
| 332 | <p> |
| 333 | These can be overridden by using the <tt>--with-max-width</tt> and |
| 334 | <tt>--with-max-height</tt> options. The two need not be equal. |
| 335 | </p><p> |
| 336 | Do note that Mesa uses these values to size some internal buffers, |
| 337 | so increasing these sizes will cause Mesa to require additional |
| 338 | memory. Furthermore, increasing these limits beyond <tt>4096</tt> |
| 339 | may introduce rasterization artifacts; see the leading comments in |
| 340 | <tt>src/mesa/swrast/s_tritemp.h</tt>. |
| 341 | </p> |
| 342 | |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 343 | <br> |
| 344 | <br> |
| 345 | |
| 346 | |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 347 | <h1 id="part4">4. Developer Questions</h1> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 348 | |
Andreas Boll | cc41888 | 2012-06-12 09:05:33 +0200 | [diff] [blame] | 349 | <h2>4.1 How can I contribute?</h2> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 350 | <p> |
Andreas Boll | 5abb1f8 | 2012-09-19 18:22:37 +0200 | [diff] [blame] | 351 | First, join the <a href="lists.html">mesa-dev mailing list</a>. |
Brian Paul | d5299bf | 2006-08-21 14:26:06 +0000 | [diff] [blame] | 352 | That's where Mesa development is discussed. |
Dan Nicholson | f71032b | 2007-12-14 09:59:16 -0800 | [diff] [blame] | 353 | </p> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 354 | <p> |
Andreas Boll | a73c59b | 2012-09-18 19:31:28 +0200 | [diff] [blame] | 355 | The <a href="http://www.opengl.org/documentation"> |
Nathan Kidd | 0691b37 | 2014-01-03 16:44:00 -0700 | [diff] [blame] | 356 | OpenGL Specification</a> is the bible for OpenGL implementation work. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 357 | You should read it. |
| 358 | </p> |
| 359 | <p>Most of the Mesa development work involves implementing new OpenGL |
| 360 | extensions, writing hardware drivers (for the DRI), and code optimization. |
| 361 | </p> |
| 362 | |
| 363 | <h2>4.2 How do I write a new device driver?</h2> |
| 364 | <p> |
| 365 | Unfortunately, writing a device driver isn't easy. |
| 366 | It requires detailed understanding of OpenGL, the Mesa code, and your |
| 367 | target hardware/operating system. |
| 368 | 3D graphics are not simple. |
| 369 | </p> |
| 370 | <p> |
| 371 | The best way to get started is to use an existing driver as your starting |
| 372 | point. |
Andreas Boll | b534c39 | 2012-10-05 23:14:10 +0200 | [diff] [blame] | 373 | For a classic hardware driver, the i965 driver is a good example. |
| 374 | For a Gallium3D hardware driver, the r300g, r600g and the i915g are good examples. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 375 | </p> |
| 376 | <p>The DRI website has more information about writing hardware drivers. |
| 377 | The process isn't well document because the Mesa driver interface changes |
Nathan Kidd | 0691b37 | 2014-01-03 16:44:00 -0700 | [diff] [blame] | 378 | over time, and we seldom have spare time for writing documentation. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 379 | That being said, many people have managed to figure out the process. |
| 380 | </p> |
| 381 | <p> |
| 382 | Joining the appropriate mailing lists and asking questions (and searching |
| 383 | the archives) is a good way to get information. |
| 384 | </p> |
| 385 | |
| 386 | |
Brian Paul | 0c65604 | 2006-06-08 19:59:41 +0000 | [diff] [blame] | 387 | <h2>4.3 Why isn't GL_EXT_texture_compression_s3tc implemented in Mesa?</h2> |
Brian Paul | fc528e2 | 2003-12-31 20:59:51 +0000 | [diff] [blame] | 388 | <p> |
Andreas Boll | a73c59b | 2012-09-18 19:31:28 +0200 | [diff] [blame] | 389 | The <a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_compression_s3tc.txt">specification for the extension</a> |
Brian Paul | fc528e2 | 2003-12-31 20:59:51 +0000 | [diff] [blame] | 390 | indicates that there are intellectual property (IP) and/or patent issues |
| 391 | to be dealt with. |
| 392 | </p> |
Nathan Kidd | 0691b37 | 2014-01-03 16:44:00 -0700 | [diff] [blame] | 393 | <p>We've been unsuccessful in getting a response from S3 (or whoever owns |
Brian Paul | fc528e2 | 2003-12-31 20:59:51 +0000 | [diff] [blame] | 394 | the IP nowadays) to indicate whether or not an open source project can |
| 395 | implement the extension (specifically the compression/decompression |
| 396 | algorithms). |
| 397 | </p> |
| 398 | <p> |
Andreas Boll | a73c59b | 2012-09-18 19:31:28 +0200 | [diff] [blame] | 399 | In the mean time, a 3rd party <a href="http://dri.freedesktop.org/wiki/S3TC"> |
| 400 | plug-in library</a> is available. |
Brian Paul | fc528e2 | 2003-12-31 20:59:51 +0000 | [diff] [blame] | 401 | </p> |
| 402 | |
Andreas Boll | b5da52a | 2012-09-18 18:57:02 +0200 | [diff] [blame] | 403 | </div> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 404 | </body> |
| 405 | </html> |