1848b8605Smrg<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2848b8605Smrg<html lang="en"> 3848b8605Smrg<head> 4848b8605Smrg <meta http-equiv="content-type" content="text/html; charset=utf-8"> 5848b8605Smrg <title>OpenGL ES</title> 6848b8605Smrg <link rel="stylesheet" type="text/css" href="mesa.css"> 7848b8605Smrg</head> 8848b8605Smrg<body> 9848b8605Smrg 10848b8605Smrg<div class="header"> 11848b8605Smrg <h1>The Mesa 3D Graphics Library</h1> 12848b8605Smrg</div> 13848b8605Smrg 14848b8605Smrg<iframe src="contents.html"></iframe> 15848b8605Smrg<div class="content"> 16848b8605Smrg 17848b8605Smrg<h1>OpenGL ES</h1> 18848b8605Smrg 19848b8605Smrg<p>Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0. More information about 20b8e80941SmrgOpenGL ES can be found at <a href="https://www.khronos.org/opengles/"> 21b8e80941Smrghttps://www.khronos.org/opengles/</a>.</p> 22848b8605Smrg 23848b8605Smrg<p>OpenGL ES depends on a working EGL implementation. Please refer to 24848b8605Smrg<a href="egl.html">Mesa EGL</a> for more information about EGL.</p> 25848b8605Smrg 26848b8605Smrg<h2>Build the Libraries</h2> 27848b8605Smrg<ol> 28b8e80941Smrg<li>Run <code>meson configure</code> with <code>-D gles1=true -D gles2=true</code> and enable the Gallium driver for your hardware.</li> 29848b8605Smrg<li>Build and install Mesa as usual.</li> 30848b8605Smrg</ol> 31848b8605Smrg 32848b8605SmrgAlternatively, if XCB-DRI2 is installed on the system, one can use 33848b8605Smrg<code>egl_dri2</code> EGL driver with OpenGL|ES-enabled DRI drivers 34848b8605Smrg 35848b8605Smrg<ol> 36b8e80941Smrg<li>Run <code>meson configure</code> with <code>-D gles1=true -D gles2=true</code>.</li> 37848b8605Smrg<li>Build and install Mesa as usual.</li> 38848b8605Smrg</ol> 39848b8605Smrg 40848b8605Smrg<p>Both methods will install libGLESv1_CM, libGLESv2, libEGL, and one or more 41848b8605SmrgEGL drivers for your hardware.</p> 42848b8605Smrg 43848b8605Smrg<h2>Run the Demos</h2> 44848b8605Smrg 45848b8605Smrg<p>There are some demos in <code>mesa/demos</code> repository.</p> 46848b8605Smrg 47848b8605Smrg<h2>Developers</h2> 48848b8605Smrg 49848b8605Smrg<h3>Dispatch Table</h3> 50848b8605Smrg 51848b8605Smrg<p>OpenGL ES has an additional indirection when dispatching functions</p> 52848b8605Smrg 53848b8605Smrg<pre> 54848b8605Smrg Mesa: glFoo() --> _mesa_Foo() 55848b8605Smrg OpenGL ES: glFoo() --> _es_Foo() --> _mesa_Foo() 56848b8605Smrg</pre> 57848b8605Smrg 58848b8605Smrg<p>The indirection serves several purposes</p> 59848b8605Smrg 60848b8605Smrg<ul> 61848b8605Smrg<li>When a function is in Mesa and the type matches, it checks the arguments and calls the Mesa function.</li> 62848b8605Smrg<li>When a function is in Mesa but the type mismatches, it checks and converts the arguments before calling the Mesa function.</li> 63848b8605Smrg<li>When a function is not available in Mesa, or accepts arguments that are not available in OpenGL, it provides its own implementation.</li> 64848b8605Smrg</ul> 65848b8605Smrg 66848b8605Smrg<p>Other than the last case, OpenGL ES uses <code>APIspec.xml</code> to generate functions to check and/or converts the arguments.</p> 67848b8605Smrg 68848b8605Smrg</div> 69848b8605Smrg</body> 70848b8605Smrg</html> 71