<li>Run <code>configure</code> with <code>--with-state-trackers=egl_g3d,es</code> and enable the Gallium driver for your hardware.</li>
<li>Build and install Mesa as usual.</li>
</ol>
<p>It 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>progs/es1/</code> and <code>progs/es2/</code>. You can use them to test your build. For example,</p>
<pre>
$ cd progs/es1/xegl
$ make
$ ./torus
</pre>
<h2>Developers</h2>
<p>The core of OpenGL ES state trackers is the ES overlay. It is located in
<code>src/mesa/es/</code>.</p>
<h3>Structure</h3>
<p>The ES overlay uses as much code as possible from Mesa. It has its own glapi XMLs to describe the APIs of OpenGL ES. The ES overlay can be built parallelly with Mesa, and they will give</p>