Rebuild LowLevelDemo as a 12-tile example selector - #4
Conversation
One example per tile of ThorVG's README example_primitives.png, each a direct port of the matching thorvg.example source to the C API, chosen by uncommenting exactly one line in Program.cs (the engine's VisualTests runner pattern). The previous composite demo survives as Showcase, the only animated example; static scenes rasterise once and idle. Infrastructure/ holds what used to be the monolithic Program: the runner (window, swapchain, pinned ABGR8888 buffer, fullscreen triangle), the native resolver and the shaders. Assets vendored from thorvg.example (MIT; Public Sans under OFL 1.1), see ATTRIBUTION.txt.
API gate: additiveEvery symbol that existed still exists, unchanged. Nothing that compiled before stops compiling.
Enum and constant values are part of the measured surface: a renumbering keeps compiling and sends the wrong number to the driver, so it counts as a removal. |
The Text example only ever drew Latin, so nothing proved that tvg_text_set_text's LPUTF8Str marshalling survives anything outside ASCII. It now has a second column with Chinese, Japanese in all three scripts at once, Korean from a second font, and accented Latin with Greek and Cyrillic. None of the small fonts in thorvg.example cover Han -- the only one that does is SentyCloud at 16 MB. These are Noto Sans SC and KR subset to the characters the example draws: 68 KB and 7 KB. See ATTRIBUTION.txt for how to regenerate them. Also makes the process PerMonitorV2 aware. Left unaware it sized the swapchain in virtual pixels and let Windows upscale, which softened every glyph and anti-aliased edge above 100% scaling -- the one thing these examples exist to show.
API gate: additiveEvery symbol that existed still exists, unchanged. Nothing that compiled before stops compiling.
Enum and constant values are part of the measured surface: a renumbering keeps compiling and sends the wrong number to the driver, so it counts as a removal. |
The demo is the twelve README tiles and nothing else. Removes the example, its Lottie asset and the attribution entry for it. The runner keeps ExampleBase.Update and its dirty-frame branch: no example returns true any more, so every scene rasterises once and the loop idles, but the hook stays as the extension point for an animated one. Nothing now exercises tvg_animation_* or tvg_picture_load_data from the demo -- Test/Program.cs still covers the latter.
API gate: additiveEvery symbol that existed still exists, unchanged. Nothing that compiled before stops compiling.
Enum and constant values are part of the measured surface: a renumbering keeps compiling and sends the wrong number to the driver, so it counts as a removal. |
One example per tile of ThorVG's README
example_primitives.png, selectable Evergine-style:Program.csis a selector where exactly oneRunner.Run<...>()line is uncommented (the engine's VisualTests runner pattern).CanvasEngineOptionis virtual — flip toALIASEDto compareThe old monolithic
Program.csbecameInfrastructure/(Runner, ExampleBase, NativeResolver, Shaders). Static examples rasterise once and idle; the runner only re-uploads the texture whenUpdate()reports a change.All 13 verified live on win-x64: window capture per example compared against the README tiles, 117 fps, clean teardown. Assets vendored from thorvg.example (MIT; Public Sans OFL 1.1) — see
Assets/ATTRIBUTION.txt. Nothing in this PR ships in the NuGet package.