AtlatestRepositorysigil-graphics
1# Changelog
2
3All notable changes to this project will be documented in this file.
4
5The format is based on [Keep a Changelog](https://keepachangelog.com/),
6and this project adheres to [Semantic Versioning](https://semver.org/).
7
8## [0.11.4] - 2026-09-20
9
10### Changed
12- The window package is **sigil-desktop 0.10** (sigil-app renamed and
13 rebuilt on GLFW: native Wayland or X11 on Linux, picked at startup).
14 The dependency is `(from-git url: "codeberg:sigil/sigil-app"
15 name: "sigil-desktop" version: "^0.10.0")` until the repository rename
16 lands; the Sigil API of this package is unchanged.
17- **No libGL link, no GL headers.** sokol_gfx runs with
18 `SOKOL_EXTERNAL_GL_LOADER` on every native target: `src/c/gl_native_loader.h`
19 (generated from the vendored `sokol_gfx.h` by `scripts/gen-gl-loader.sh`,
20 122 entry points) fills sokol's GL function pointers through
21 `sigil_desktop_gl_get_proc_address` in `gfx-setup`. Linux `link-flags`
22 are empty (were `-lGL`); Windows unchanged (none); darwin keeps
23 `OpenGL.framework` and drops `Metal` and `MetalKit`, which nothing used.
24 A game's NEEDED list is now libm, libc and the loader (plus whatever
25 sigil-audio links).
26- `sokol_glue.h` and the `sokol_app.h` declaration include are gone. The
27 native environment and swapchain are built in `graphics.c` from
28 `sigil_desktop_framebuffer_size` with the values sokol_app's GL backend
29 reported (RGBA8, depth-stencil, no MSAA, framebuffer 0). `sokol_log`'s
30 implementation moved into this package.
31- `gfx-setup` raises `gfx-setup: no OpenGL context` when called outside
32 `app-run` / `run-game` instead of crashing inside sokol.
33- `manifest.scm` lists the GLFW compile-time headers and drops `libglvnd`
34 (Guix's mesa is built without it, and a vendorless `libGLX.so.0` on the
35 library path breaks GLX at run time).
37### Requires
39- Sigil 0.20+ and sigil-desktop 0.10.0+.
41### Upgrade notes
43- **Change your own window dependency line, not just this one.** Until the
44 Codeberg repository rename, the window package is fetched from the old
45 URL under its new name, and sigil-build keys a dependency by the name it
46 derives from the URL. A consumer that keeps
47 `(from-git url: "codeberg:sigil/sigil-app" version: "^0.9.0")` while
48 pulling this release gets two installs of the same repository
49 (`.sigil/deps/sigil-app` at 0.9 and `.sigil/deps/sigil-desktop` at 0.10:
50 two window stacks, two `slog_func`s at link time). Write
51 `(from-git url: "codeberg:sigil/sigil-app" name: "sigil-desktop" version: "^0.10.0")`
52 on your own line, bump this package to `^0.11.4`, delete `build/` once,
53 rebuild.
55## [0.11.0] - 2026-06-25
57### Changed
59- Raised the toolchain requirement to Sigil 0.17. The package now
60 declares `sigil: "^0.17"` (was `^0.15`). Sigil 0.17 makes the
61 package-level `sigil:` field mandatory and derives the native codegen
62 runtime (`sigil-lib`) from it, so building under the 0.17 compiler
63 requires this bump. This is a minor release because consumers
64 caret-pinning sigil-graphics must move to the 0.17 line.
65- Bumped the `sigil-app` dependency to `^0.9.0` (the 0.17-line release
66 of sigil-app), since the whole native stack must derive the same
67 0.17 `sigil-lib`.
69### Requires
71- Sigil 0.17+ and sigil-app 0.9.0+.
73## [0.9.3] - 2026-04-24
75### Fixed
77- `link-flags:` now uses `(lambda (ctx) (case (target-os ctx) ...))`
78 instead of a host-based `(case (host-os) ...)` expression. The
79 host-based form evaluated at package-load time on the host, so
80 `-lGL` leaked into Windows cross-compile builds and caused the
81 final link to fail against zig's MinGW sysroot (which has no
82 matching GL import library). The procedural form re-evaluates at
83 link time with the target triple. Branches themselves are
84 unchanged (`linux`: `-lGL`; `darwin`: `-framework OpenGL
85 -framework Metal -framework MetalKit`; `windows`: `'()`, since
86 sokol_gfx's GL backend dynamically loads `opengl32.dll`).
88### Requires
90- `sigil-build` 0.14.0+ (for the `target-os` / `target-arch` helpers
91 and the procedural-link-flags dispatch in `collect-native-link-flags`).
93## [0.9.0] - 2026-04-18
95> Note: skips 0.8.0. The `v0.8.0` git tag was used on 2026-03-29 for the
96> initial standalone-repo extraction, but `package.sgl` was never bumped
97> past 0.7.0 then. To avoid rewriting a published tag, this minor release
98> jumps to 0.9.0.
100### Added
102- `draw-filled-circle x y radius [segments]` — filled circle primitive
103 rendered as a triangle fan via sokol_gp. `segments` defaults to 16 and
104 is clamped to `[3, 128]`. For tiny shapes (radius 4–6 px), 12–16
105 segments is plenty; larger circles benefit from more. Draw cost scales
106 linearly with `segments`, so use the smallest count that still looks
107 round at the target radius — bullet/particle code on hot paths should
108 pick a fixed low count rather than letting it default. Colour comes
109 from the currently bound `set-color`.
110- `set-blend-mode mode` and `reset-blend-mode` — Sigil-level blend mode
111 control. `mode` is one of `'normal` (alpha blend), `'additive`, or
112 `'none` (no blending). The Sigil wrapper shadows the mode in module
113 state so `with-blend-mode` can restore the previous value.
114- `with-blend-mode mode body ...` — scoped form that sets `mode`, runs
115 `body`, then restores the previous mode. `with-additive-blend body
116 ...` is the recommended convenience wrapper for particle / bullet
117 halo rendering — it avoids forgotten restores that would leak the
118 blend state into other draws.
119- `current-blend-mode` — accessor for the Sigil-tracked blend mode.
121### Notes
123- Only `'normal`, `'additive`, and `'none` are exposed. sokol_gp also
124 supports premultiplied-alpha, modulate, and multiply modes; those can
125 be added when something needs them. Adding a new mode is a one-line
126 change in `blend_mode_from_value` (`src/c/graphics.c`).
127- See `examples/circles-blend/` for a side-by-side normal-vs-additive
128 demo. Note: the demo binary build currently fails in the transitive
129 `sigil-lib` rebuild on a missing `minicoro.h` include path — this is
130 a pre-existing build-infra bug, not in this package.
132## [0.5.0] - 2026-02-17
134### Added
136- Added test harness generation and build support for packages with native dependencies. Improved native package handling, added c-flags field to library struct. Fixed stdlib inclusion in bundles with custom native runtimes, directory structure preservation in compile-c-sources, and absolute sigil-lib include path resolution.
137- Added test coverage.
138- Added test coverage.
139- Added test coverage for TCP/UDP/address operations and crypto primitives.
141### Fixed
143- Fixed random seed initialization crash caused by flonum-to-bignum promotion in modulo. Fixed status command crash when displaying projected versions for packages without changes.
144- Fixed SSE and remove-after initialization on child elements. Added comprehensive test coverage for routing, middleware, cookies, security, SSE, and response helpers.
146### Other
148- New packages split from sigil-studio. Font and image modules moved to (sigil graphics *) namespace.
149- GC correctness: added write barriers to all heap mutation sites, enabled GC during compilation with full compiler rooting, and added GC stress testing infrastructure. Completed HAMT dict implementation (printing, equality, collision handling, structural removal). Added arbitrary-precision bignum type with full reader/VM/native/serializer integration. Performance: inline caching for module binding lookups, peephole optimizer with 8 superinstruction patterns. Improved error handling: replaced exit(1) with recoverable errors, fixed error propagation in vm_error_abort and OP_ABORT_TO_PROMPT. Added definition location tracking in stack traces. Implemented VFS/bundle directory listing. Fixed number->string precision for exact IEEE 754 roundtrip. Removed dead opcodes.
150- Configured custom mbedTLS for TLS 1.2 only. Added test coverage for connection predicates, failure paths, and error handling.
151- New packages split from sigil-studio. Font and image modules moved to (sigil graphics *) namespace.