mirror of
https://github.com/thead-yocto-mirror/skia
synced 2026-07-15 20:46:34 +02:00
ANGLE EGL Headers
The EGL headers ANGLE uses are generated using the Khronos tools but modified to include function pointer types and function prototype guards.
Regenerating EGL.h
- Install Python 3 (not 2) with the lxml addon. You can do this using
pip install lxmlfrom your Python's Scripts folder. - Clone https://github.com/KhronosGroup/EGL-Registry.git.
- Edit
EGL-Registry/api/genheaders.pyand add the following underglesProtoPrefixStrings:
eglProtoPrefixStrings = [
'#ifndef EGL_EGL_PROTOTYPES',
'#define EGL_EGL_PROTOTYPES 1',
'#endif',
''
]
-
Also in
EGL-Registry/api/genheaders.py:- Look for the section titled
# EGL API - EGL/egl.h (no function pointers, yet @@@) - Set
prefixTexttoprefixStrings + eglPlatformStrings + eglProtoPrefixStrings + genDateCommentString - Change
genFuncPointers = False,togenFuncPointers = True, - Change
protectProto = False,toprotectProto = 'nonzero', - Change
protectProtoStr = 'EGL_EGLEXT_PROTOTYPES',toprotectProtoStr = 'EGL_EGL_PROTOTYPES',
- Look for the section titled
-
Set your working directory to
EGL-Registry/api/. -
Run
python genheaders.py -registry egl.xml EGL/egl.h -
The generated header will now be in
EGL-Registry/api/EGL/egl.h. You can copy the header over to this folder. -
Also update
scripts/egl.xmlwith the latest version fromEGL-Registry/api/.