Commitdf1d13c1Recorded20 Sep 2026Repositorysigil-graphics
Review fixes: macOS feature detection, generator anchor, redirects, upgrade note
Message
- gl_native_loader.h includes TargetConditionals.h on Apple: sokol_gfx picks its Apple feature set from it and, with an external loader, no longer includes it itself, so macOS read as iOS (no base-vertex draws).
- gen-gl-loader.sh anchors the end of the constants block on its actual last line (GL_MAX_IMAGE_UNITS) instead of a constant forty lines earlier.
- dev-redirects.sgl (and the test's) point at ../sigil-app, the checkout that exists, until David renames it.
- The upgrade note tells consumers to put name: "sigil-desktop" on their own window dependency line, and why.
- The web branch's slog_func comment no longer names sigil-app.
Changed
CHANGELOG.md | 13 +++++++++++--
dev-redirects.sgl | 5 +++--
scripts/gen-gl-loader.sh | 10 +++++++++-
src/c/gl_native_loader.h | 8 ++++++++
src/c/sokol-graphics.c | 5 +++--
test/test-shader-limits/dev-redirects.sgl | 4 ++--
6 files changed, 36 insertions(+), 9 deletions(-)Diff
CHANGELOG.mdmodified
@@ -40,8 +40,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
40
41
### Upgrade notes 42
−43
- Relock, delete `build/` once (a stale `sokol-app.o` otherwise stays in−44
the consumer's `libsigil-app.a` archive), rebuild.+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. 54
55
## [0.11.0] - 2026-06-25 56
dev-redirects.sglmodified
@@ -1,6 +1,7 @@
1
;; Development redirects — point dependencies at local checkouts. 2
;; sigil-desktop was named sigil-app through 0.9.x; the Codeberg repo is−3
;; being renamed in place, so its URL stays until then.+3
;; being renamed in place, so its URL stays until then, and the local+4
;; checkout is still ../sigil-app until David renames it. 5
(redirects 6
repos: (list 7
(for-repo@@ -8,4 +9,4 @@
9
use: (from-path dir: "../sigil")) 10
(for-repo 11
url: "codeberg:sigil/sigil-app"−11
use: (from-path dir: "../sigil-desktop"))))+12
use: (from-path dir: "../sigil-app"))))scripts/gen-gl-loader.shmodified
@@ -31,7 +31,7 @@ awk '
31
N1=$(wc -l < "$T/defs.h") 32
[ "$N1" -gt 200 ] && [ "$N1" -lt 400 ] || { echo "REFUSING: types+constants block is $N1 lines (expected 200..400)"; exit 1; } 33
grep -q '^typedef unsigned int GLenum;' "$T/defs.h" || { echo "REFUSING: no GLenum typedef"; exit 1; }−34
grep -q '^#define GL_RGBA16 ' "$T/defs.h" || { echo "REFUSING: constants block does not end where expected"; exit 1; }+34
tail -1 "$T/defs.h" | grep -q "^#define GL_MAX_IMAGE_UNITS " || { echo "REFUSING: constants block does not end on GL_MAX_IMAGE_UNITS (got: $(tail -1 "$T/defs.h"))"; exit 1; } 35
36
# 2. the X-macro list: the body of _SG_GL_FUNCS, minus the SG_GL_FUNCS_EXT hook 37
awk '@@ -65,6 +65,14 @@ cat <<HDR
65
#include <stddef.h> 66
#include <stdint.h> 67
+68
/* sokol_gfx picks its Apple feature set from TargetConditionals.h, which it+69
* includes itself only when it also includes the system GL headers; with+70
* an external loader that is this header's job, or macOS would be read as+71
* iOS (no base-vertex draws). */+72
#if defined(__APPLE__)+73
#include <TargetConditionals.h>+74
#endif+75
76
#if defined(_WIN32) && !defined(_WIN64) 77
#define GL_APIENTRY __stdcall 78
#elsesrc/c/gl_native_loader.hmodified
@@ -16,6 +16,14 @@
16
#include <stddef.h> 17
#include <stdint.h> 18
+19
/* sokol_gfx picks its Apple feature set from TargetConditionals.h, which it+20
* includes itself only when it also includes the system GL headers; with+21
* an external loader that is this header's job, or macOS would be read as+22
* iOS (no base-vertex draws). */+23
#if defined(__APPLE__)+24
#include <TargetConditionals.h>+25
#endif+26
27
#if defined(_WIN32) && !defined(_WIN64) 28
#define GL_APIENTRY __stdcall 29
#elsesrc/c/sokol-graphics.cmodified
@@ -52,8 +52,9 @@
52
#include "sokol_gfx.h" 53
#include "sokol_gp.h" 54
−55
/* slog_func is provided by sigil-app on native; on web sigil-app is not linked,−56
* so supply it here. Routes to stderr (wasi fd_write -> console) so sokol+55
/* slog_func is compiled from sokol_log.h in the native branch below; on web+56
* that header is not compiled, so supply it here. Routes to stderr (wasi+57
* fd_write -> console) so sokol 58
* validation failures stay visible without any import beyond gl.* + wasi. */ 59
#include <stdio.h> 60
#include <stdint.h>test/test-shader-limits/dev-redirects.sglmodified
@@ -1,6 +1,6 @@
1
;; Local sigil-graphics is the in-progress version under development; 2
;; sigil-desktop (URL still sigil-app until the Codeberg rename) is the−3
;; sibling checkout.+3
;; sibling checkout, still named sigil-app on disk until David renames it. 4
(redirects 5
repos: (list 6
(for-repo@@ -8,4 +8,4 @@
8
use: (from-path dir: "../..")) 9
(for-repo 10
url: "codeberg:sigil/sigil-app"−11
use: (from-path dir: "../../../sigil-desktop"))))+11
use: (from-path dir: "../../../sigil-app"))))