summaryrefslogtreecommitdiff
path: root/vendor/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/README.md')
-rw-r--r--vendor/README.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/vendor/README.md b/vendor/README.md
index 97c311d..990dd0e 100644
--- a/vendor/README.md
+++ b/vendor/README.md
@@ -5,3 +5,35 @@ Single-file codecs, vendored unchanged; `codecs.c` compiles them for the host.
| `dr_wav.h` | https://github.com/mackron/dr_libs | 0.14.6 |
| `dr_flac.h` | https://github.com/mackron/dr_libs | 0.13.4 |
| `stb_vorbis.c` | https://github.com/nothings/stb | v1.22 |
+| `cgltf.h` | https://github.com/jkuhlmann/cgltf | 1.15, commit `85cd62382dfea638278962690cf515023f33ed00` (MIT, license in header) |
+
+`cgltf.c` compiles the unchanged cgltf header for the optional `gltf` module.
+
+`font.c` and `font.h` are pardes's FreeType and HarfBuzz shim, moved from its
+`src/gui/` unchanged, under `src/font/Atlas.zig`. The embedder compiles them
+against its own FreeType and HarfBuzz and exports `ui_malloc` and friends.
+`text.c` and `text.h` are sketchbook's text over them: the faces in
+`fonts/`, shaped by HarfBuzz, and `ui_malloc` over C's heap. `build.zig`
+compiles the three, with FreeType and HarfBuzz (the packages and flags
+pardes uses), into the static library `sketchbook-text`.
+
+`presentation-time/presentation-time.xml` is the Wayland presentation-time v3
+protocol description (the client binds v1; its license is included in the XML).
+On Linux, `build.zig` runs `wayland-scanner` to generate a client header and C
+protocol tables in the build cache, then translates that header into the existing
+Zig `c` module alongside SDL. No generated C/header files are checked in.
+
+All handwritten callbacks, resource ownership, clock conversion, pacing and trace
+formatting live in `src/host/Presentation.zig`. Run `zig build test-presentation`
+(or `zig build test-timing`) from the project root to test them. Linux builds need
+`wayland-scanner` and the `wayland-client` development package.
+
+The trace uses a private event queue dispatched on the SDL thread. Per-frame
+feedback objects are owned by libwayland; our pending slots and completed-record
+ring are fixed capacity. CSV `commit_ns` timestamps the feedback request before
+`SDL_RenderPresent`, rather than intercepting `wl_surface.commit`; the protocol
+associates feedback with the next commit of the SDL surface. Presented times,
+refresh periods, sequence numbers and flags are supplied by the compositor.
+`sample_ms` is the draw sample clock in SDL's epoch; `commit_ns` and `presented_ns` use the
+advertised protocol clock. Discarded rows have no presentation timestamp. A
+trace snapshot reports pending requests, exhausted slots and its retention limit.