v0.7.0
Highlights
Sokol backend correctness, lifecycle, and parity with raylib. Verified end-to-end with the new examples/sokol_imgui/ smoke test.
Bug fixes
- #37 —
run()andmakeDesc()inbackends/sokol/src/window.zigeach took an anonymous struct parameter, and Zig treats those as distinct types.sapp.run(makeDesc(desc))failed to compile, blocking every sokol-backend project. Fixed by forwarding fields explicitly into themakeDesccall. - #34 —
Shape.rectanglewithfill = .outlinerendered as a filled block on sokol because the backend never defineddrawRectangleLinesExand the labelle-gfx fallback routed it todrawRectangleRec. Implemented assgl.beginLineStripover the four corners. Declarativegizmos/*.zonoutlined rects now render correctly on sokol. - #35 — Sokol cleared the framebuffer to near-white
(0.95, 0.95, 0.95). Raylib clears to(30, 30, 35)dark blue-gray. Same project ported between backends produced wildly different backdrops and broke alpha compositing visuals. Sokol now matches raylib. - #36 — Two sokol input/lifecycle bugs:
frame()never polledg.isRunning(), sogame.quit()had no effect on sokol — only window-manager close worked. Now polls and calls a newwindow.requestQuit()(forwarding tosapp.requestQuit()).newFrame()clearedkeys_pressed[]at the top of the frame callback, before scripts ran. Sokol_app dispatched KEY_DOWN events intopressed[]before invokingframe_cb, so the script'sisKeyPressed(.escape)always sawfalse. MovednewFrame()to the end offrame()so scripts see one-shot edges as expected.
- #38 —
sokolEventonly forwarded events tobackend_input.handleEvent. ImGui (via the labelle-imgui sokol bridge) never saw mouse/keyboard, so simgui's IO state stayed empty and ImGui buttons/sliders were dead. Addedgui_event_externandgui_event_forwardtemplate scalars that emit an extern declaration forimgui_bridge_handle_eventand forward each sapp event to it when the project has a GUI configured. No-op for projects without a GUI.
New examples
- #32 (merged externally) — Android-ready sokol example with WASD camera, jump animation, gizmo outlines.
- #39 —
examples/sokol_imgui/end-to-end smoke test for sokol + Dear ImGui via the labelle-imgui bridge. Click counter and slider widgets exercise the full event-IO path.
Compatibility
- Raylib backend: unchanged. Verified that raylib + imgui still works with no changes against this release.
- Sokol non-GUI projects: unaffected — the new event-forwarding template scalars expand to empty strings when no GUI is configured.
- iOS/Android sokol targets: not yet validated against the event-forwarding hook in #38; if you hit unresolved
imgui_bridge_handle_eventsymbols on those platforms, please file an issue.
Commits
a5486b7 Merge pull request #39 from labelle-toolkit/examples/sokol-imgui-smoke
a0a7d0b feat(examples): sokol + imgui smoke test example
74316bc Merge pull request #38 from labelle-toolkit/fix/sokol-forward-events-to-gui
9d5bdc6 fix(sokol): forward sapp events to the GUI bridge so ImGui IO works
a68fd51 feat(sokol): Android-ready example with WASD/animation/gizmos (#32)
5d5c9b2 Merge pull request #37 from labelle-toolkit/fix/sokol-rundesc-compile-error
e49b25c fix(sokol): forward run() fields explicitly into makeDesc() call
4ed2c11 Merge pull request #36 from labelle-toolkit/fix/sokol-input-lifecycle
465e070 fix(sokol): route game.quit() through frame loop and fix isKeyPressed timing
aca4e47 Merge pull request #35 from labelle-toolkit/fix/sokol-clear-color-parity
ecba9c4 fix(sokol): match raylib clear color (30, 30, 35)
a2a2c97 Merge pull request #34 from labelle-toolkit/fix/sokol-rect-outline
What's Changed
- fix(sokol): remove HiDPI camera offset double-scaling by @apotema in #29
- fix(sokol): implement drawRectangleLinesEx so Shape.fill=outline renders as outline by @apotema in #34
- fix(sokol): match raylib clear color (30, 30, 35) by @apotema in #35
- fix(sokol): route game.quit() through frame loop and fix isKeyPressed timing by @apotema in #36
- fix(sokol): forward run() fields explicitly into makeDesc() call by @apotema in #37
- feat(sokol): Android-ready example with WASD/animation/gizmos by @apotema in #32
- fix(sokol): forward sapp events to the GUI bridge so ImGui IO works by @apotema in #38
- feat(examples): sokol + imgui smoke test example by @apotema in #39
Full Changelog: v0.6.0...v0.7.0