Version 0.10.0 has been released. This is a small release before the new year, and includes hairline support, in addition to some very small API changes.
Does anyone have advice on using z2d with SDL3? Getting a bit lost in the details since I’m new to Zig, z2d and SDL.
I’m trying using the 7Games/zig-sdl3 wrapper but an example using another wrapper, calls to the SDL C functions or even just a description would be helpful.
It seems like the general gist is:
Build up a z2d surface using the painter commands
Create an SDL3 surface or texture
Copy the raw pixel buffer from the z2d surface to the SDL3 surface or texture
@g4b3 you have the right approach! If you know you’re always going to be working with said surface/texture memory exclusively, you might want to look into how you can just map the memory directly, and then use Surface.initBuffer so you can just render directly to it, and save yourself some copying.