2020-06-11 07:55:43 +03:00
|
|
|
# Introduction
|
|
|
|
|
|
|
|
This page describes how to add new extensions to ANGLE.
|
|
|
|
|
|
|
|
# Adding EGL extensions
|
|
|
|
|
|
|
|
Note: see also [anglebug.com/2621](http://anglebug.com/2621), linked
|
|
|
|
from the [starter project](Starter-Projects.md) doc, to simplify some
|
|
|
|
of these steps.
|
|
|
|
|
|
|
|
For extensions requiring new entry points:
|
|
|
|
|
2020-07-15 03:26:27 +03:00
|
|
|
* Add the extension xml to
|
|
|
|
[scripts/egl_angle_ext.xml](../scripts/egl_angle_ext.xml) .
|
2020-06-11 07:55:43 +03:00
|
|
|
|
|
|
|
* Note the prototypes for the new entry points must be added to the
|
|
|
|
top of the file, and the functions themselves grouped under the
|
|
|
|
extension name to the bottom of the file.
|
|
|
|
|
2020-07-15 03:26:27 +03:00
|
|
|
* Modify [scripts/registry_xml.py](../scripts/registry_xml.py) to add
|
|
|
|
the new extension as needed.
|
2020-06-11 07:55:43 +03:00
|
|
|
|
2020-07-15 03:26:27 +03:00
|
|
|
* Run
|
|
|
|
[scripts/run_code_generation.py](../scripts/run_code_generation.py)
|
|
|
|
.
|
2020-06-11 07:55:43 +03:00
|
|
|
|
2020-07-15 03:26:27 +03:00
|
|
|
* The entry point itself goes in
|
|
|
|
[entry_points_egl_ext.h](../src/libGLESv2/entry_points_egl_ext.h)
|
|
|
|
and
|
|
|
|
[entry_points_egl_ext.cpp](../src/libGLESv2/entry_points_egl_ext.cpp)
|
|
|
|
.
|
2020-06-11 07:55:43 +03:00
|
|
|
|
2020-07-15 03:26:27 +03:00
|
|
|
* Add the new function to [libEGL.cpp](../src/libEGL/libEGL.cpp) and
|
|
|
|
[libEGL.def](../src/libEGL/libEGL.def) .
|
|
|
|
|
|
|
|
* Update [eglext_angle.h](../include/EGL/eglext_angle.h) with the new
|
|
|
|
entry points and/or enums.
|
2020-06-11 07:55:43 +03:00
|
|
|
|
|
|
|
* Add members to the appropriate Extensions struct in
|
2020-07-15 03:26:27 +03:00
|
|
|
[Caps.h](../src/libANGLE/Caps.h) and
|
|
|
|
[Caps.cpp](../src/libANGLE/Caps.cpp) .
|
2020-06-11 07:55:43 +03:00
|
|
|
|
|
|
|
* Initialize extension availability in the `Display` subclass's
|
2020-07-15 03:26:27 +03:00
|
|
|
`generateExtensions` method for displays that can support the
|
|
|
|
extension; for example,
|
|
|
|
[DisplayCGL](../src/libANGLE/renderer/gl/cgl/DisplayCGL.mm).
|