Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4358 | Serge | 1 | |
2 | |||
3 | |||
4 | |||
5 | |||
6 | 1. An EGL API dispatcher. This directly routes all the eglFooBar() API |
||
7 | |||
8 | |||
9 | 2. Fallbacks for EGL API functions. A driver _could_ implement all the |
||
10 | |||
11 | in libEGL (such as eglChooseConfig()) will do the job. |
||
12 | |||
13 | |||
14 | |||
15 | |||
16 | |||
17 | When the apps calls eglOpenDisplay() a device driver is selected and loaded |
||
18 | |||
19 | |||
20 | The driver's _eglMain() function is then called. This driver function |
||
21 | |||
22 | subclass of that type). |
||
23 | |||
24 | As part of initialization, the dispatch table in _EGLDriver->API must be |
||
25 | |||
26 | can be used to plug in default/fallback functions. Some functions like |
||
27 | driver->API.Initialize and driver->API.Terminate _must_ be implemented |
||
28 | with driver-specific code (no default/fallback function is possible). |
||
29 | |||
30 | |||
31 | |||
32 | |||
33 | initialization that wasn't done in _eglMain() should be done at this |
||
34 | point. Typically, this will involve setting up visual configs, etc. |
||
35 | |||
36 | |||
37 | |||
38 | |||
39 | |||
40 | Certain EGL functions _must_ be implemented by the driver. This includes: |
||
41 | |||
42 | eglCreateContext |
||
43 | |||
44 | eglCreatePixmapSurface |
||
45 | eglCreatePBufferSurface |
||
46 | eglMakeCurrent |
||
47 | eglSwapBuffers |
||
48 | |||
49 | Most of the EGLConfig-related functions can be implemented with the |
||
50 | |||
51 | |||
52 | |||
53 | |||
54 | |||
55 | |||
56 | |||
57 | When eglTerminate() is called, the driver->API.Terminate() function is |
||
58 | |||
59 | then close/unload the driver (shared library). |
||
60 | |||
61 | |||
62 | |||
63 | |||
64 | |||
65 | |||
66 | The internal libEGL data structures such as _EGLDisplay, _EGLContext, |
||
67 | |||
68 | will derive subclasses. |
||
69 |