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>OpenGL ES</title> |
| 6 | <link rel="stylesheet" type="text/css" href="mesa.css"> |
| 7 | </head> |
Chia-I Wu | d8299af | 2010-01-11 18:25:03 +0800 | [diff] [blame] | 8 | <body> |
| 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 | |
Chia-I Wu | 2e3c4e4 | 2010-05-07 14:13:08 +0800 | [diff] [blame] | 17 | <h1>OpenGL ES</h1> |
Chia-I Wu | d8299af | 2010-01-11 18:25:03 +0800 | [diff] [blame] | 18 | |
Nathan Kidd | 0691b37 | 2014-01-03 16:44:00 -0700 | [diff] [blame] | 19 | <p>Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0. More information about |
Andreas Boll | a73c59b | 2012-09-18 19:31:28 +0200 | [diff] [blame] | 20 | OpenGL ES can be found at <a href="http://www.khronos.org/opengles/"> |
| 21 | http://www.khronos.org/opengles/</a>.</p> |
Chia-I Wu | d8299af | 2010-01-11 18:25:03 +0800 | [diff] [blame] | 22 | |
Chia-I Wu | 2e3c4e4 | 2010-05-07 14:13:08 +0800 | [diff] [blame] | 23 | <p>OpenGL ES depends on a working EGL implementation. Please refer to |
| 24 | <a href="egl.html">Mesa EGL</a> for more information about EGL.</p> |
Chia-I Wu | d8299af | 2010-01-11 18:25:03 +0800 | [diff] [blame] | 25 | |
| 26 | <h2>Build the Libraries</h2> |
| 27 | <ol> |
Chia-I Wu | 1258317 | 2011-01-07 17:24:16 +0800 | [diff] [blame] | 28 | <li>Run <code>configure</code> with <code>--enable-gles1 --enable-gles2</code> and enable the Gallium driver for your hardware.</li> |
Chia-I Wu | d8299af | 2010-01-11 18:25:03 +0800 | [diff] [blame] | 29 | <li>Build and install Mesa as usual.</li> |
| 30 | </ol> |
| 31 | |
Chia-I Wu | 2e3c4e4 | 2010-05-07 14:13:08 +0800 | [diff] [blame] | 32 | Alternatively, if XCB-DRI2 is installed on the system, one can use |
| 33 | <code>egl_dri2</code> EGL driver with OpenGL|ES-enabled DRI drivers |
| 34 | |
| 35 | <ol> |
| 36 | <li>Run <code>configure</code> with <code>--enable-gles1 --enable-gles2</code>.</li> |
| 37 | <li>Build and install Mesa as usual.</li> |
| 38 | </ol> |
| 39 | |
| 40 | <p>Both methods will install libGLESv1_CM, libGLESv2, libEGL, and one or more |
| 41 | EGL drivers for your hardware.</p> |
| 42 | |
Chia-I Wu | d8299af | 2010-01-11 18:25:03 +0800 | [diff] [blame] | 43 | <h2>Run the Demos</h2> |
| 44 | |
Chia-I Wu | 8eea050 | 2011-06-20 11:14:56 +0900 | [diff] [blame] | 45 | <p>There are some demos in <code>mesa/demos</code> repository.</p> |
Chia-I Wu | d8299af | 2010-01-11 18:25:03 +0800 | [diff] [blame] | 46 | |
| 47 | <h2>Developers</h2> |
| 48 | |
Chia-I Wu | d8299af | 2010-01-11 18:25:03 +0800 | [diff] [blame] | 49 | <h3>Dispatch Table</h3> |
| 50 | |
Nathan Kidd | 0691b37 | 2014-01-03 16:44:00 -0700 | [diff] [blame] | 51 | <p>OpenGL ES has an additional indirection when dispatching functions</p> |
Chia-I Wu | d8299af | 2010-01-11 18:25:03 +0800 | [diff] [blame] | 52 | |
| 53 | <pre> |
| 54 | Mesa: glFoo() --> _mesa_Foo() |
Chia-I Wu | 2e3c4e4 | 2010-05-07 14:13:08 +0800 | [diff] [blame] | 55 | OpenGL ES: glFoo() --> _es_Foo() --> _mesa_Foo() |
Chia-I Wu | d8299af | 2010-01-11 18:25:03 +0800 | [diff] [blame] | 56 | </pre> |
| 57 | |
| 58 | <p>The indirection serves several purposes</p> |
| 59 | |
| 60 | <ul> |
| 61 | <li>When a function is in Mesa and the type matches, it checks the arguments and calls the Mesa function.</li> |
| 62 | <li>When a function is in Mesa but the type mismatches, it checks and converts the arguments before calling the Mesa function.</li> |
| 63 | <li>When a function is not available in Mesa, or accepts arguments that are not available in OpenGL, it provides its own implementation.</li> |
| 64 | </ul> |
| 65 | |
Chia-I Wu | 2e3c4e4 | 2010-05-07 14:13:08 +0800 | [diff] [blame] | 66 | <p>Other than the last case, OpenGL ES uses <code>APIspec.xml</code> to generate functions to check and/or converts the arguments.</p> |
Chia-I Wu | d8299af | 2010-01-11 18:25:03 +0800 | [diff] [blame] | 67 | |
Andreas Boll | b5da52a | 2012-09-18 18:57:02 +0200 | [diff] [blame] | 68 | </div> |
Chia-I Wu | d8299af | 2010-01-11 18:25:03 +0800 | [diff] [blame] | 69 | </body> |
| 70 | </html> |