~nhanb/sdl3-zig-probe

try SDL's open file dialog
use text engine; plug leaks
add web page using the same font

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~nhanb/sdl3-zig-probe
read/write
git@git.sr.ht:~nhanb/sdl3-zig-probe

You can also use your local clone with git send-email.

Evaluating SDL3 as the base for a cross-platform, render-on-demand, hidpi-aware, crisp, high-performance, immediate-mode GUI.

  • Cross-platform: sdl3, 'nuff said
  • Render on demand: SDL_HINT_MAIN_CALLBACK_RATE = "waitevent"
  • Crisp text rendering with SDL_ttf which uses freetype & harfbuzz
  • High performance:

#Compile

Currently SDL3_ttf seems to trigger UB, so we have to disable UBSan using ReleaseFast for it to not crash immediately.

# Statically compile as many deps as possible:
zig build run -Doptimize=ReleaseFast

# Or, to use system libraries:
zig build run -fsys=sdl -fsys=sdl_ttf -fsys=freetype -fsys=harfbuzz -Doptimize=ReleaseFast

Yoga is currently not packaged for Arch Linux, so it's always compiled from source & statically linked. Actually sdl3_ttf isn't packaged either, but it's on AUR and probably gonna be official soon.

#Runtime

KDE Plasma 6.3 doesn't support fifo-v1 (6.4 will, but it's not released yet), so SDL3 still defaults to Xwayland on my computer. We can still force Wayland by setting an envar: SDL_VIDEODRIVER=wayland.

Do not follow this link