Index of /pub/Distributions_Linux/NetBSD/NetBSD-release-9/xsrc/external/mit/MesaLib.old/dist/src/egl/main/
| Name | Last Modified | Size | Type |
| Parent Directory/ | | - | Directory |
| CVS/ | 2020-Mar-19 23:39:37 | - | Directory |
| Android.mk | 2019-Mar-08 11:19:17 | 4.5K | application/octet-stream |
| Makefile.am | 2019-Mar-08 11:19:17 | 2.8K | application/octet-stream |
| Makefile.in | 2019-Mar-08 11:19:17 | 33.8K | application/octet-stream |
| Makefile.sources | 2019-Mar-08 11:19:17 | 0.5K | application/octet-stream |
| README.txt | 2019-Mar-08 11:19:17 | 2.0K | text/plain |
| SConscript | 2019-Mar-08 11:19:17 | 0.8K | application/octet-stream |
| egl.def | 2019-Mar-08 11:19:17 | 0.6K | application/octet-stream |
| egl.pc.in | 2019-Mar-08 11:19:17 | 0.2K | application/octet-stream |
| eglapi.c | 2019-Mar-08 11:19:17 | 49.5K | text/plain |
| eglapi.h | 2019-Mar-08 11:19:17 | 11.2K | application/octet-stream |
| eglarray.c | 2019-Mar-08 11:19:17 | 4.7K | text/plain |
| eglarray.h | 2019-Mar-08 11:19:17 | 2.2K | application/octet-stream |
| eglcompiler.h | 2019-Mar-08 11:19:17 | 2.9K | application/octet-stream |
| eglconfig.c | 2019-Mar-08 11:19:17 | 25.3K | text/plain |
| eglconfig.h | 2019-Mar-08 11:19:17 | 7.1K | application/octet-stream |
| eglcontext.c | 2019-Mar-08 11:19:17 | 18.3K | text/plain |
| eglcontext.h | 2019-Mar-08 11:19:17 | 4.0K | application/octet-stream |
| eglcurrent.c | 2019-Mar-08 11:19:17 | 7.9K | text/plain |
| eglcurrent.h | 2019-Mar-08 11:19:17 | 2.8K | application/octet-stream |
| egldefines.h | 2019-Mar-08 11:19:17 | 1.5K | application/octet-stream |
| egldisplay.c | 2019-Mar-08 11:19:17 | 12.6K | text/plain |
| egldisplay.h | 2019-Mar-08 11:19:17 | 6.6K | application/octet-stream |
| egldriver.c | 2019-Mar-08 11:19:17 | 15.1K | text/plain |
| egldriver.h | 2019-Mar-08 11:19:17 | 3.6K | application/octet-stream |
| eglfallbacks.c | 2019-Mar-08 11:19:17 | 4.4K | text/plain |
| eglglobals.c | 2019-Mar-08 11:19:17 | 2.8K | text/plain |
| eglglobals.h | 2019-Mar-08 11:19:17 | 2.0K | application/octet-stream |
| eglimage.c | 2019-Mar-08 11:19:17 | 6.2K | text/plain |
| eglimage.h | 2019-Mar-08 11:19:17 | 4.2K | application/octet-stream |
| egllog.c | 2019-Mar-08 11:19:17 | 4.9K | text/plain |
| egllog.h | 2019-Mar-08 11:19:17 | 1.8K | application/octet-stream |
| eglmisc.c | 2019-Mar-08 11:19:17 | 5.3K | text/plain |
| eglmisc.h | 2019-Mar-08 11:19:17 | 1.5K | application/octet-stream |
| eglmode.c | 2019-Mar-08 11:19:17 | 9.5K | text/plain |
| eglmode.h | 2019-Mar-08 11:19:17 | 2.6K | application/octet-stream |
| eglmutex.h | 2019-Mar-08 11:19:17 | 1.8K | application/octet-stream |
| eglscreen.c | 2019-Mar-08 11:19:17 | 5.9K | text/plain |
| eglscreen.h | 2019-Mar-08 11:19:17 | 3.4K | application/octet-stream |
| eglstring.c | 2019-Mar-08 11:19:17 | 1.6K | text/plain |
| eglstring.h | 2019-Mar-08 11:19:17 | 1.7K | application/octet-stream |
| eglsurface.c | 2019-Mar-08 11:19:17 | 14.3K | text/plain |
| eglsurface.h | 2019-Mar-08 11:19:17 | 4.7K | application/octet-stream |
| eglsync.c | 2019-Mar-08 11:19:17 | 3.3K | text/plain |
| eglsync.h | 2019-Mar-08 11:19:17 | 3.2K | application/octet-stream |
| egltypedefs.h | 2019-Mar-08 11:19:17 | 2.1K | application/octet-stream |
Notes about the EGL library:
The EGL code here basically consists of two things:
1. An EGL API dispatcher. This directly routes all the eglFooBar() API
calls into driver-specific functions.
2. Fallbacks for EGL API functions. A driver _could_ implement all the
EGL API calls from scratch. But in many cases, the fallbacks provided
in libEGL (such as eglChooseConfig()) will do the job.
Bootstrapping:
When the apps calls eglOpenDisplay() a device driver is selected and loaded
(look for dlsym() or LoadLibrary() in egldriver.c).
The driver's _eglMain() function is then called. This driver function
allocates, initializes and returns a new _EGLDriver object (usually a
subclass of that type).
As part of initialization, the dispatch table in _EGLDriver->API must be
populated with all the EGL entrypoints. Typically, _eglInitDriverFallbacks()
can be used to plug in default/fallback functions. Some functions like
driver->API.Initialize and driver->API.Terminate _must_ be implemented
with driver-specific code (no default/fallback function is possible).
A bit later, the app will call eglInitialize(). This will get routed
to the driver->API.Initialize() function. Any additional driver
initialization that wasn't done in _eglMain() should be done at this
point. Typically, this will involve setting up visual configs, etc.
Special Functions:
Certain EGL functions _must_ be implemented by the driver. This includes:
eglCreateContext
eglCreateWindowSurface
eglCreatePixmapSurface
eglCreatePBufferSurface
eglMakeCurrent
eglSwapBuffers
Most of the EGLConfig-related functions can be implemented with the
defaults/fallbacks. Same thing for the eglGet/Query functions.
Teardown:
When eglTerminate() is called, the driver->API.Terminate() function is
called. The driver should clean up after itself. eglTerminate() will
then close/unload the driver (shared library).
Subclassing:
The internal libEGL data structures such as _EGLDisplay, _EGLContext,
_EGLSurface, etc should be considered base classes from which drivers
will derive subclasses.