• Home
Name Date Size #Lines LOC

..--

.gitignoreD03-May-20249 21

Android.mkD03-May-20244 KiB15587

Makefile.amD03-May-20243.7 KiB13998

README.txtD03-May-20242 KiB7240

SConscriptD03-May-20241 KiB5747

egl.defD03-May-2024687 3635

egl.pc.inD03-May-2024275 1311

eglapi.cD03-May-202442.8 KiB1,5801,097

eglapi.hD03-May-202410.3 KiB210126

eglarray.cD03-May-20244.7 KiB210123

eglarray.hD03-May-20242.3 KiB8632

eglcompiler.hD03-May-20243.8 KiB12768

eglconfig.cD03-May-202425.3 KiB842608

eglconfig.hD03-May-20247.2 KiB227136

eglcontext.cD03-May-202417.8 KiB613363

eglcontext.hD03-May-20244.1 KiB15367

eglcurrent.cD03-May-20248 KiB336221

eglcurrent.hD03-May-20242.8 KiB11745

egldefines.hD03-May-20241.6 KiB466

egldisplay.cD03-May-202410.6 KiB457280

egldisplay.hD03-May-20246 KiB242124

egldriver.cD03-May-202415.2 KiB715465

egldriver.hD03-May-20243.6 KiB12642

eglfallbacks.cD03-May-20244.4 KiB12475

eglglobals.cD03-May-20242.5 KiB8139

eglglobals.hD03-May-20241.8 KiB6215

eglimage.cD03-May-20243.3 KiB11863

eglimage.hD03-May-20243.7 KiB14964

egllog.cD03-May-20245 KiB209119

egllog.hD03-May-20241.9 KiB5915

eglmisc.cD03-May-20244.9 KiB173100

eglmisc.hD03-May-20241.6 KiB436

eglmode.cD03-May-20249.6 KiB358225

eglmode.hD03-May-20242.7 KiB8930

eglmutex.hD03-May-20242.3 KiB8139

eglscreen.cD03-May-20245.9 KiB236126

eglscreen.hD03-May-20243.5 KiB11740

eglstring.cD03-May-20241.7 KiB5515

eglstring.hD03-May-20241.8 KiB5115

eglsurface.cD03-May-202413.8 KiB531425

eglsurface.hD03-May-20244.6 KiB17477

eglsync.cD03-May-20243.3 KiB11767

eglsync.hD03-May-20243.3 KiB13256

egltypedefs.hD03-May-20242.2 KiB7222

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 eglOpenDisplay() a device driver is selected and loaded
20(look for dlsym() or LoadLibrary() in egldriver.c).
21
22The driver's _eglMain() 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
33A bit later, the app will call eglInitialize().  This will get routed
34to the driver->API.Initialize() function.  Any additional driver
35initialization that wasn't done in _eglMain() should be done at this
36point.  Typically, this will involve setting up visual configs, etc.
37
38
39
40Special Functions:
41
42Certain EGL functions _must_ be implemented by the driver.  This includes:
43
44eglCreateContext
45eglCreateWindowSurface
46eglCreatePixmapSurface
47eglCreatePBufferSurface
48eglMakeCurrent
49eglSwapBuffers
50
51Most of the EGLConfig-related functions can be implemented with the
52defaults/fallbacks.  Same thing for the eglGet/Query functions.
53
54
55
56
57Teardown:
58
59When eglTerminate() is called, the driver->API.Terminate() function is
60called.  The driver should clean up after itself.  eglTerminate() will
61then close/unload the driver (shared library).
62
63
64
65
66Subclassing:
67
68The internal libEGL data structures such as _EGLDisplay, _EGLContext,
69_EGLSurface, etc should be considered base classes from which drivers
70will derive subclasses.
71
72