blob: d02482589e9fe1cdaadd73b51740346b45d07262 [file] [log] [blame]
Andreas Bollecd5c7c2012-06-12 09:05:03 +02001<!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 Wud8299af2010-01-11 18:25:03 +08008<body>
9
Chia-I Wu2e3c4e42010-05-07 14:13:08 +080010<h1>OpenGL ES</h1>
Chia-I Wud8299af2010-01-11 18:25:03 +080011
Chia-I Wu2e3c4e42010-05-07 14:13:08 +080012<p>Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0. More informations about
13OpenGL ES can be found at <a href="http://www.khronos.org/opengles/"
14target="_parent"> http://www.khronos.org/opengles/</a>.</p>
Chia-I Wud8299af2010-01-11 18:25:03 +080015
Chia-I Wu2e3c4e42010-05-07 14:13:08 +080016<p>OpenGL ES depends on a working EGL implementation. Please refer to
17<a href="egl.html">Mesa EGL</a> for more information about EGL.</p>
Chia-I Wud8299af2010-01-11 18:25:03 +080018
19<h2>Build the Libraries</h2>
20<ol>
Chia-I Wu12583172011-01-07 17:24:16 +080021<li>Run <code>configure</code> with <code>--enable-gles1 --enable-gles2</code> and enable the Gallium driver for your hardware.</li>
Chia-I Wud8299af2010-01-11 18:25:03 +080022<li>Build and install Mesa as usual.</li>
23</ol>
24
Chia-I Wu2e3c4e42010-05-07 14:13:08 +080025Alternatively, if XCB-DRI2 is installed on the system, one can use
26<code>egl_dri2</code> EGL driver with OpenGL|ES-enabled DRI drivers
27
28<ol>
29<li>Run <code>configure</code> with <code>--enable-gles1 --enable-gles2</code>.</li>
30<li>Build and install Mesa as usual.</li>
31</ol>
32
33<p>Both methods will install libGLESv1_CM, libGLESv2, libEGL, and one or more
34EGL drivers for your hardware.</p>
35
Chia-I Wud8299af2010-01-11 18:25:03 +080036<h2>Run the Demos</h2>
37
Chia-I Wu8eea0502011-06-20 11:14:56 +090038<p>There are some demos in <code>mesa/demos</code> repository.</p>
Chia-I Wud8299af2010-01-11 18:25:03 +080039
40<h2>Developers</h2>
41
Chia-I Wud8299af2010-01-11 18:25:03 +080042<h3>Dispatch Table</h3>
43
Chia-I Wu2e3c4e42010-05-07 14:13:08 +080044<p>OpenGL ES has an additional indirection when dispatching fucntions</p>
Chia-I Wud8299af2010-01-11 18:25:03 +080045
46<pre>
47 Mesa: glFoo() --&gt; _mesa_Foo()
Chia-I Wu2e3c4e42010-05-07 14:13:08 +080048 OpenGL ES: glFoo() --&gt; _es_Foo() --&gt; _mesa_Foo()
Chia-I Wud8299af2010-01-11 18:25:03 +080049</pre>
50
51<p>The indirection serves several purposes</p>
52
53<ul>
54<li>When a function is in Mesa and the type matches, it checks the arguments and calls the Mesa function.</li>
55<li>When a function is in Mesa but the type mismatches, it checks and converts the arguments before calling the Mesa function.</li>
56<li>When a function is not available in Mesa, or accepts arguments that are not available in OpenGL, it provides its own implementation.</li>
57</ul>
58
Chia-I Wu2e3c4e42010-05-07 14:13:08 +080059<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 Wud8299af2010-01-11 18:25:03 +080060
61</body>
62</html>