Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 1 | OpenGL ES |
| 2 | ========= |
| 3 | |
| 4 | Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0. More information about |
| 5 | OpenGL ES can be found at https://www.khronos.org/opengles/. |
| 6 | |
Erik Faye-Lund | 9be0e2d | 2020-06-15 12:31:36 +0200 | [diff] [blame] | 7 | OpenGL ES depends on a working EGL implementation. Please refer to |
| 8 | :doc:`Mesa EGL <egl>` for more information about EGL. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 9 | |
| 10 | Build the Libraries |
| 11 | ------------------- |
| 12 | |
| 13 | #. Run ``meson configure`` with ``-D gles1=true -D gles2=true`` and |
| 14 | enable the Gallium driver for your hardware. |
| 15 | #. Build and install Mesa as usual. |
| 16 | |
| 17 | Alternatively, if XCB-DRI2 is installed on the system, one can use |
| 18 | ``egl_dri2`` EGL driver with OpenGL|ES-enabled DRI drivers |
| 19 | |
| 20 | #. Run ``meson configure`` with ``-D gles1=true -D gles2=true``. |
| 21 | #. Build and install Mesa as usual. |
| 22 | |
| 23 | Both methods will install libGLESv1_CM, libGLESv2, libEGL, and one or |
| 24 | more EGL drivers for your hardware. |
| 25 | |
| 26 | Run the Demos |
| 27 | ------------- |
| 28 | |
| 29 | There are some demos in ``mesa/demos`` repository. |
| 30 | |
| 31 | Developers |
| 32 | ---------- |
| 33 | |
| 34 | Dispatch Table |
| 35 | ~~~~~~~~~~~~~~ |
| 36 | |
| 37 | OpenGL ES has an additional indirection when dispatching functions |
| 38 | |
| 39 | :: |
| 40 | |
| 41 | Mesa: glFoo() --> _mesa_Foo() |
| 42 | OpenGL ES: glFoo() --> _es_Foo() --> _mesa_Foo() |
| 43 | |
| 44 | The indirection serves several purposes |
| 45 | |
| 46 | - When a function is in Mesa and the type matches, it checks the |
| 47 | arguments and calls the Mesa function. |
| 48 | - When a function is in Mesa but the type mismatches, it checks and |
| 49 | converts the arguments before calling the Mesa function. |
| 50 | - When a function is not available in Mesa, or accepts arguments that |
| 51 | are not available in OpenGL, it provides its own implementation. |
| 52 | |
| 53 | Other than the last case, OpenGL ES uses ``APIspec.xml`` to generate |
| 54 | functions to check and/or converts the arguments. |