Skip to main content

Pragtical v3.12.0 Release

· 5 min read
Jefferson Gonzalez
Contributor of Pragtical

Pragtical v3.12.0 is out with a modular renderer stack, a new SDL GPU backend, project module trust prompts, networking safety improvements, and a set of polish fixes for plugin loading, search feedback, diffs, and the welcome view.

Modular Renderer Backends

This release splits the renderer implementations into selectable backends. The surface renderer remains the default, while SDL renderer and SDL GPU are now built into the same binary and can be selected at startup:

PRAGTICAL_RENDERER=surface|sdlrenderer|sdlgpu

Packagers can also choose the compiled default with Meson:

-Drenderer_backend=surface|sdlrenderer|sdlgpu

The important part is that this is no longer a one-backend-at-build-time setup. Users and developers can switch renderers without rebuilding the editor.

SDL GPU Backend

The new SDL GPU backend moves editor rendering toward GPU-native replay instead of relying on CPU dirty-region uploads as the main path. Window rendering now uses GPU-backed frame textures, atlas-backed glyph rendering, and batched replay for text, rectangles, canvases, pixels, and polygons.

The backend also supports offscreen rendering paths used by canvases, including canvas copy, blend, clip, and mutation behavior. Canvas revision tracking was added so cached draw commands are invalidated when canvas contents change.

SDL GPU remains opt-in for this release, but it is usable enough for testing and for users who want to try the faster path. If SDL GPU cannot create a usable GPU device, Pragtical falls back to the surface backend instead of aborting during startup.

Renderer Performance

Local global-PGO benchmark runs showed SDL GPU reducing frame time across the main graphics benchmarks when compared with the surface backend:

renderer_backend.lua:  surface 5.966 ms, sdlgpu 3.431 ms, 1.74x faster
zoom_stress.lua: surface 41.310 ms, sdlgpu 34.393 ms, 1.20x faster
rect_cube.lua: surface 1.935 ms, sdlgpu 1.301 ms, 1.49x faster

Text rendering benefits the most from atlas-backed GPU replay:

hot grayscale text:    surface 9.622 ms, sdlgpu 4.361 ms, 2.21x faster
hot subpixel text: surface 10.630 ms, sdlgpu 4.355 ms, 2.44x faster
cold glyph churn: surface 6.675 ms, sdlgpu 1.986 ms, 3.36x faster
icon font text: surface 6.311 ms, sdlgpu 1.893 ms, 3.33x faster
clipped text: surface 3.139 ms, sdlgpu 1.856 ms, 1.69x faster

This is still a first release of the GPU backend. The surface renderer remains the conservative default while SDL GPU continues to mature across platforms.

VSync And Presentation

Renderer presentation now has a backend hook for vsync. The graphics "Auto FPS" setting can apply it live through renwindow:set_vsync(enabled).

For SDL GPU this ties swapchain behavior to the editor's frame pacing: auto FPS uses tear-free presentation, while disabling it presents every rendered frame for lower latency. This fixes tearing observed on D3D12/Windows during GPU backend testing.

Project Module Trust

Project modules are now gated behind trust prompts. This makes project-local Lua loading more explicit and safer, especially when opening code from unknown or downloaded repositories.

trust preview

As pointed out by AmerM137 Network-sensitive Lua loading also received additional safeguards. Network Lua files and remote Markdown images are skipped when networking is disabled.

Search, Plugins, And UI Fixes

Search now reports totals incrementally, so large searches provide feedback while results are still being collected, which fixes an issue reported by 2trvl.

Plugin loading was tightened so non-Lua files are not treated as plugins, plugin directory details are handled correctly, fixing an issue reported by Kabcorp. Also, the EmptyView plugin button appears when the plugin manager command is available.

DiffView also received fixes for scrollbar markers and folding behavior, and fold hover state is now cleared when the mouse leaves the relevant area.

Build And Packaging

Local runs now copy LuaJIT modules needed by runtime profiling helpers, making scripts/run-local more useful for development and profiling sessions.

The ppm helper now uses its native Meson build path, and rolling release artifacts are stripped. Those builds are meant for regular use rather than debug-symbol-based issue reports, so stripping reduces size and improves the release artifact profile.

Thanks to everyone who reported bugs!

Downloads on GitHub.

Changes Log

New Features

  • Modularize renderer backends and add SDL GPU rendering (#481)

  • Gate project modules behind trust prompts (#530)

Enhancements

  • Use startup scale environment when restarting (#528)

  • Copy LuaJIT modules for local runs (#529)

  • Skip network Lua files when networking is disabled (#532)

  • Disable remote markdown images when networking is disabled (#533)

  • Show search totals incrementally (#536)

  • Use native ppm Meson build (#540)

Fixes

  • Skip loading non-Lua files as plugins (#535)

  • Handle directory plugin details (2d6b3aa3)

  • Clear fold hover state on mouse leave (#537)

  • Fix DiffView scrollbar markers and disable folding in diffs (#538)

  • Fix regex negative offsets (#539)

  • Fix EmptyView plugin button detection (#542)

Build System

  • Strip rolling release artifacts (#543)