• Home
Name Date Size #Lines LOC

..--

README.txtD03-May-20242 KiB7139

egl.defD03-May-2024687 3635

egl.pc.inD03-May-2024275 1311

eglapi.cD03-May-202473.5 KiB2,4871,735

eglapi.hD03-May-202410 KiB208138

eglarray.cD03-May-20244.8 KiB213125

eglarray.hD03-May-20242.4 KiB9539

eglcompiler.hD03-May-20241.6 KiB4713

eglconfig.cD03-May-202425.7 KiB852617

eglconfig.hD03-May-20247.4 KiB241147

eglcontext.cD03-May-202423.3 KiB737394

eglcontext.hD03-May-20244.1 KiB16274

eglcurrent.cD03-May-20248.9 KiB366250

eglcurrent.hD03-May-20243.4 KiB13061

egldefines.hD03-May-20241.8 KiB5814

egldisplay.cD03-May-202413.3 KiB564354

egldisplay.hD03-May-20247.1 KiB290163

egldriver.cD03-May-20247.5 KiB353209

egldriver.hD03-May-20243.6 KiB13045

eglfallbacks.cD03-May-20243.5 KiB10556

eglglobals.cD03-May-20242.9 KiB10457

eglglobals.hD03-May-20242.3 KiB8031

eglimage.cD03-May-20246.2 KiB194138

eglimage.hD03-May-20244.3 KiB17484

egllog.cD03-May-20244.9 KiB210120

egllog.hD03-May-20241.9 KiB6721

eglsurface.cD03-May-202415.5 KiB583463

eglsurface.hD03-May-20244.8 KiB18787

eglsync.cD03-May-20244.6 KiB156101

eglsync.hD03-May-20243.3 KiB13659

egltypedefs.hD03-May-20242.2 KiB8027

README.txt

1
2
3Notes about the EGL library:
4
5
6The EGL code here basically consists of two things:
7
81. An EGL API dispatcher.  This directly routes all the eglFooBar() API
9   calls into driver-specific functions.
10
112. Fallbacks for EGL API functions.  A driver _could_ implement all the
12   EGL API calls from scratch.  But in many cases, the fallbacks provided
13   in libEGL (such as eglChooseConfig()) will do the job.
14
15
16
17Bootstrapping:
18
19When the apps calls eglInitialize() a device driver is selected and loaded
20(look for _eglAddDrivers() and _eglLoadModule() in egldriver.c).
21
22The built-in driver's entry point function is then called.  This driver function
23allocates, initializes and returns a new _EGLDriver object (usually a
24subclass of that type).
25
26As part of initialization, the dispatch table in _EGLDriver->API must be
27populated with all the EGL entrypoints.  Typically, _eglInitDriverFallbacks()
28can be used to plug in default/fallback functions.  Some functions like
29driver->API.Initialize and driver->API.Terminate _must_ be implemented
30with driver-specific code (no default/fallback function is possible).
31
32
33Shortly after, the driver->API.Initialize() function is executed.  Any additional
34driver initialization that wasn't done in the driver entry point should be
35done at this point.  Typically, this will involve setting up visual configs, etc.
36
37
38
39Special Functions:
40
41Certain EGL functions _must_ be implemented by the driver.  This includes:
42
43eglCreateContext
44eglCreateWindowSurface
45eglCreatePixmapSurface
46eglCreatePBufferSurface
47eglMakeCurrent
48eglSwapBuffers
49
50Most of the EGLConfig-related functions can be implemented with the
51defaults/fallbacks.  Same thing for the eglGet/Query functions.
52
53
54
55
56Teardown:
57
58When eglTerminate() is called, the driver->API.Terminate() function is
59called.  The driver should clean up after itself.  eglTerminate() will
60then close/unload the driver (shared library).
61
62
63
64
65Subclassing:
66
67The internal libEGL data structures such as _EGLDisplay, _EGLContext,
68_EGLSurface, etc should be considered base classes from which drivers
69will derive subclasses.
70
71