|
1 | | --- freedesktop.egl — libEGL.so.1, plus `import egl;`. |
| 1 | +-- freedesktop.egl — libEGL.so.1, plus `import khronos.egl;`. |
2 | 2 | -- |
3 | 3 | -- EGL is the window-system binding: `eglGetPlatformDisplay`, |
4 | 4 | -- `eglCreateContext`, `eglCreateWindowSurface`, `eglMakeCurrent`, and the |
|
42 | 42 | -- other than libEGL needs it — `libGL` and `libGLX` would. |
43 | 43 | -- |
44 | 44 | -- ───────────────────────────────────────────────────────────────────────── |
45 | | --- THE MODULE ADDS NO API |
46 | | --- |
47 | | --- `import egl;` replaces `#include <EGL/egl.h>` and changes nothing else: |
48 | | --- every exported name is upstream's, spelled upstream's way. Unlike wayland's |
49 | | --- module this one needed no forwarders — EGL's entry points are declared |
50 | | --- `EGLAPI … EGLAPIENTRY` with external linkage rather than `static inline`, so |
51 | | --- `using ::name;` reaches all of them. |
| 45 | +-- THE MODULE ADDS NO API, AND IS NAMED FOR THE SPECIFICATION |
| 46 | +-- |
| 47 | +-- `import khronos.egl;` replaces `#include <EGL/egl.h>` and changes nothing |
| 48 | +-- else: every exported name is upstream's, spelled upstream's way. Unlike |
| 49 | +-- wayland's module this one needed no forwarders — EGL's entry points are |
| 50 | +-- declared `EGLAPI … EGLAPIENTRY` with external linkage rather than |
| 51 | +-- `static inline`, so `using ::name;` reaches all of them. |
| 52 | +-- |
| 53 | +-- `khronos.` AND NOT `freedesktop.`, even though the package is |
| 54 | +-- `freedesktop.egl`. EGL is a Khronos SPECIFICATION with several |
| 55 | +-- implementations; libglvnd is one, and freedesktop is only where it is |
| 56 | +-- hosted. A module name is global and permanent in a way a package name is |
| 57 | +-- not, so it should name the INTERFACE's owner rather than whoever supplies |
| 58 | +-- the definitions — otherwise swapping implementations forces every consumer |
| 59 | +-- to edit its imports, which defeats a wrapper whose whole promise is that it |
| 60 | +-- changes nothing but the include line. |
| 61 | +-- |
| 62 | +-- `mcpplibs.openkal` paid for this lesson already: its 0.1.0 was withdrawn |
| 63 | +-- rather than kept because it "placed the module a consumer imports under the |
| 64 | +-- control of the implementation, which contradicts what the specification is |
| 65 | +-- for". `freedesktop.wayland` resolves the other way for the same reason — |
| 66 | +-- freedesktop DOES own the wayland protocol, so those modules are |
| 67 | +-- `freedesktop.wayland.{client,server,util}`. |
| 68 | +-- |
| 69 | +-- A side effect worth having: two EGL providers in one build now collide on |
| 70 | +-- the module name instead of coexisting silently, which is what GLVND's |
| 71 | +-- one-dispatch-point design wants anyway. |
52 | 72 | -- |
53 | 73 | -- ONE CONSEQUENCE WORTH KNOWING: the module interface unit is compiled INTO |
54 | 74 | -- `libEGL.so.1`, because mcpp links every library target against all of a |
@@ -108,7 +128,7 @@ package = { |
108 | 128 | GLOBAL = "https://github.com/mcpplibs/libglvnd/archive/refs/tags/v1.7.0.tar.gz", |
109 | 129 | CN = "https://gitcode.com/mcpp-res/libglvnd/releases/download/1.7.0/libglvnd-1.7.0.tar.gz", |
110 | 130 | }, |
111 | | - sha256 = "2bc59cb214ac2750cf09764f9b5822132be96f1c4f6fe40a2553dae8efb36663", |
| 131 | + sha256 = "d50579071c5e0b883cddae82fac3f8d7c575b6523c9ea64b855a3d6f50951d47", |
112 | 132 | }, |
113 | 133 | }, |
114 | 134 | }, |
|
0 commit comments