2013-09-05 07:58:30 -06:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|
|
|
<title>OpenGL ES</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="mesa.css">
|
|
|
|
</head>
|
|
|
|
<body>
|
2010-05-22 14:05:42 -06:00
|
|
|
|
2013-09-05 07:58:30 -06:00
|
|
|
<div class="header">
|
|
|
|
<h1>The Mesa 3D Graphics Library</h1>
|
|
|
|
</div>
|
2010-05-22 14:05:42 -06:00
|
|
|
|
2013-09-05 07:58:30 -06:00
|
|
|
<iframe src="contents.html"></iframe>
|
|
|
|
<div class="content">
|
2010-05-22 14:05:42 -06:00
|
|
|
|
2011-10-23 07:37:25 -06:00
|
|
|
<h1>OpenGL ES</h1>
|
2010-05-22 14:05:42 -06:00
|
|
|
|
2014-07-09 15:08:50 -06:00
|
|
|
<p>Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0. More information about
|
2013-09-05 07:58:30 -06:00
|
|
|
OpenGL ES can be found at <a href="http://www.khronos.org/opengles/">
|
|
|
|
http://www.khronos.org/opengles/</a>.</p>
|
2010-05-22 14:05:42 -06:00
|
|
|
|
2011-10-23 07:37:25 -06:00
|
|
|
<p>OpenGL ES depends on a working EGL implementation. Please refer to
|
|
|
|
<a href="egl.html">Mesa EGL</a> for more information about EGL.</p>
|
2010-05-22 14:05:42 -06:00
|
|
|
|
|
|
|
<h2>Build the Libraries</h2>
|
|
|
|
<ol>
|
2012-08-17 07:57:59 -06:00
|
|
|
<li>Run <code>configure</code> with <code>--enable-gles1 --enable-gles2</code> and enable the Gallium driver for your hardware.</li>
|
2011-10-23 07:37:25 -06:00
|
|
|
<li>Build and install Mesa as usual.</li>
|
|
|
|
</ol>
|
|
|
|
|
|
|
|
Alternatively, if XCB-DRI2 is installed on the system, one can use
|
|
|
|
<code>egl_dri2</code> EGL driver with OpenGL|ES-enabled DRI drivers
|
|
|
|
|
|
|
|
<ol>
|
|
|
|
<li>Run <code>configure</code> with <code>--enable-gles1 --enable-gles2</code>.</li>
|
2010-05-22 14:05:42 -06:00
|
|
|
<li>Build and install Mesa as usual.</li>
|
|
|
|
</ol>
|
|
|
|
|
2011-10-23 07:37:25 -06:00
|
|
|
<p>Both methods will install libGLESv1_CM, libGLESv2, libEGL, and one or more
|
|
|
|
EGL drivers for your hardware.</p>
|
|
|
|
|
2010-05-22 14:05:42 -06:00
|
|
|
<h2>Run the Demos</h2>
|
|
|
|
|
2012-08-17 07:57:59 -06:00
|
|
|
<p>There are some demos in <code>mesa/demos</code> repository.</p>
|
2010-05-22 14:05:42 -06:00
|
|
|
|
|
|
|
<h2>Developers</h2>
|
|
|
|
|
|
|
|
<h3>Dispatch Table</h3>
|
|
|
|
|
2014-07-09 15:08:50 -06:00
|
|
|
<p>OpenGL ES has an additional indirection when dispatching functions</p>
|
2010-05-22 14:05:42 -06:00
|
|
|
|
|
|
|
<pre>
|
|
|
|
Mesa: glFoo() --> _mesa_Foo()
|
2011-10-23 07:37:25 -06:00
|
|
|
OpenGL ES: glFoo() --> _es_Foo() --> _mesa_Foo()
|
2010-05-22 14:05:42 -06:00
|
|
|
</pre>
|
|
|
|
|
|
|
|
<p>The indirection serves several purposes</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>When a function is in Mesa and the type matches, it checks the arguments and calls the Mesa function.</li>
|
|
|
|
<li>When a function is in Mesa but the type mismatches, it checks and converts the arguments before calling the Mesa function.</li>
|
|
|
|
<li>When a function is not available in Mesa, or accepts arguments that are not available in OpenGL, it provides its own implementation.</li>
|
|
|
|
</ul>
|
|
|
|
|
2011-10-23 07:37:25 -06:00
|
|
|
<p>Other than the last case, OpenGL ES uses <code>APIspec.xml</code> to generate functions to check and/or converts the arguments.</p>
|
2010-05-22 14:05:42 -06:00
|
|
|
|
2013-09-05 07:58:30 -06:00
|
|
|
</div>
|
2010-05-22 14:05:42 -06:00
|
|
|
</body>
|
|
|
|
</html>
|