mesa/docs/opengles.html
Erik Faye-Lund ecdab0dfea docs: drop h1 in header
It's generally frowned upon to have more than one H1 per document in
HTML4. So let's put the text directly inside the header. This means we
can drop the flex-based centering, which makes things a bit easier. We
also need to change the padding to rem instead of em, because the em has
now changed.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-08 07:18:15 +00:00

71 lines
2.3 KiB
HTML

<!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>
<div class="header">
The Mesa 3D Graphics Library
</div>
<iframe src="contents.html"></iframe>
<div class="content">
<h1>OpenGL ES</h1>
<p>Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0. More information about
OpenGL ES can be found at <a href="https://www.khronos.org/opengles/">
https://www.khronos.org/opengles/</a>.</p>
<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>
<h2>Build the Libraries</h2>
<ol>
<li>Run <code>meson configure</code> with <code>-D gles1=true -D gles2=true</code> and enable the Gallium driver for your hardware.</li>
<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>meson configure</code> with <code>-D gles1=true -D gles2=true</code>.</li>
<li>Build and install Mesa as usual.</li>
</ol>
<p>Both methods will install libGLESv1_CM, libGLESv2, libEGL, and one or more
EGL drivers for your hardware.</p>
<h2>Run the Demos</h2>
<p>There are some demos in <code>mesa/demos</code> repository.</p>
<h2>Developers</h2>
<h3>Dispatch Table</h3>
<p>OpenGL ES has an additional indirection when dispatching functions</p>
<pre>
Mesa: glFoo() --&gt; _mesa_Foo()
OpenGL ES: glFoo() --&gt; _es_Foo() --&gt; _mesa_Foo()
</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>
<p>Other than the last case, OpenGL ES uses <code>APIspec.xml</code> to generate functions to check and/or converts the arguments.</p>
</div>
</body>
</html>