Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

opengles.html 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <html>
  2. <title>OpenGL ES</title>
  3. <head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
  4. <body>
  5. <h1>OpenGL ES</h1>
  6. <p>Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0. More informations about
  7. OpenGL ES can be found at <a href="http://www.khronos.org/opengles/"
  8. target="_parent"> http://www.khronos.org/opengles/</a>.</p>
  9. <p>OpenGL ES depends on a working EGL implementation. Please refer to
  10. <a href="egl.html">Mesa EGL</a> for more information about EGL.</p>
  11. <h2>Build the Libraries</h2>
  12. <ol>
  13. <li>Run <code>configure</code> with <code>--enable-gles-overlay</code> and enable the Gallium driver for your hardware.</li>
  14. <li>Build and install Mesa as usual.</li>
  15. </ol>
  16. Alternatively, if XCB-DRI2 is installed on the system, one can use
  17. <code>egl_dri2</code> EGL driver with OpenGL|ES-enabled DRI drivers
  18. <ol>
  19. <li>Run <code>configure</code> with <code>--enable-gles1 --enable-gles2</code>.</li>
  20. <li>Build and install Mesa as usual.</li>
  21. </ol>
  22. <p>Both methods will install libGLESv1_CM, libGLESv2, libEGL, and one or more
  23. EGL drivers for your hardware.</p>
  24. <h2>Run the Demos</h2>
  25. <p>There are some demos in <code>progs/egl/</code>. You can use them to test
  26. your build. For example,</p>
  27. <pre>
  28. $ cd progs/egl/eglut
  29. $ make
  30. $ cd ../opengles1
  31. $ make
  32. $ ./torus_x11
  33. </pre>
  34. <h2>Developers</h2>
  35. <h3>Internal Libraries</h3>
  36. <table border="1" style="text-align: center;">
  37. <tr><td>Library Name</td><td>Used By</td><td>Enabled</td><td>OpenGL</td><td>OpenGL ES 1.x</td><td>OpenGL ES 2.x</td></tr>
  38. <tr><td><code>libmesa.a</td><td>Classic DRI drivers</td><td>y</td><td>y</td><td>--enable-gles1</td><td>--enable-gles2</td></tr>
  39. <tr><td><code>libmesagallium.a</td><td>Gallium EGL and DRI drivers</td><td>y</td><td>y</td><td>--enable-gles1</td><td>--enable-gles2</td></tr>
  40. <tr><td><code>libes1gallium.a</td><td>Gallium EGL drivers</td><td>--enable-gles-overlay</td><td>n</td><td>y</td><td>n</td></tr>
  41. <tr><td><code>libes2gallium.a</td><td>Gallium EGL drivers</td><td>--enable-gles-overlay</td><td>n</td><td>n</td><td>y</td></tr>
  42. </table>
  43. <h3>Dispatch Table</h3>
  44. <p>OpenGL ES has an additional indirection when dispatching fucntions</p>
  45. <pre>
  46. Mesa: glFoo() --&gt; _mesa_Foo()
  47. OpenGL ES: glFoo() --&gt; _es_Foo() --&gt; _mesa_Foo()
  48. </pre>
  49. <p>The indirection serves several purposes</p>
  50. <ul>
  51. <li>When a function is in Mesa and the type matches, it checks the arguments and calls the Mesa function.</li>
  52. <li>When a function is in Mesa but the type mismatches, it checks and converts the arguments before calling the Mesa function.</li>
  53. <li>When a function is not available in Mesa, or accepts arguments that are not available in OpenGL, it provides its own implementation.</li>
  54. </ul>
  55. <p>Other than the last case, OpenGL ES uses <code>APIspec.xml</code> to generate functions to check and/or converts the arguments.</p>
  56. </body>
  57. </html>