6 ms·
Yeah, I've been looking for a minimal SDL alternative for a long time and I was really excited reading through this as that solution, but the lack of Wayland su
by amjoshuamichael 2y ago
Yeah, I've been looking for a minimal SDL alternative for a long time and I was really excited reading through this as that solution, but the lack of Wayland support is a huge dealbreaker for me.
Are there any good minimal windowing utilities that support Wayland? SDL does a lot I don't need and I try to maintain minimal dependencies. I suppose I could just use glfw & libsoundio, haven't tried that yet.
- colleagueRiley 2y agoAs far as I know, RGFW is the only minimal windowing of its kind. I guess I would suggest either targeting XWayland or using GLFW. The Wayland API itself also really sucks to work with, even more so than Xlib.... But, RGFW's Wayland support will probably be improved in the future. :)
- deleted 2y ago[deleted]
- PittleyDunkin 2y agoGLFW has worked well for me.
- marcthe12 2y agoWaylands problem is that to use it, you need code generation so the wayland backend kinda hard to design for a header only lib.
- colleagueRiley 2y agoI just have the Makefile do the code generation, it would be annoying for the user, but they can complain to Wayland if they don't like it.
- amjoshuamichael 2y agoI've seen some interesting work in doing Wayland by hand: https://gaultier.github.io/blog/wayland_from_scratch.html https://gaultier.github.io/blog/wayland_from_scratch.html I'd also look at the work done on minimal wayland projects like [foot](https://codeberg.org/dnkl/foot https://codeberg.org/dnkl/foot), which supports wayland well and seems to be written by hand (see: https://codeberg.org/dnkl/foot/src/branch/master/wayland.c https://codeberg.org/dnkl/foot/src/branch/master/wayland.c)
- vkazanov 2y agoIsn't SDL itself is quite minimal already? I mean, it is definitely not high-level in any sense of the word.
- Sharlin 2y agoNot minimal in the sense of "just give me a window, a minimal event loop, and a GPU context/swapbuffers function".
- colleagueRiley 2y agoEven then, that's what GLFW is designed to do, and it's entire source code is still far larger than RGFW's.
- slimsag 2y agoSDL provides.. ..an image decoding library. ..an audio input/output library. ..a multi-channel audio mixer. ..ttf and rtf font rendering. ..networking. ..runtime shader cross-compilation ..its own entire graphics abstraction layer / API. ..its own shader language, shader compiler, and shader bytecode format. I don't know at which point something becomes 'high level', but SDL is only 'minimal' if you use a subset of its functionality.
- nextaccountic 2y agoRust has a lot of those small libs, my favorite is miniquad https://crates.io/crates/miniquad https://crates.io/crates/miniquad
- Sharlin 2y agoOther alternatives: pixels, minifb, softbuffer.
- colleagueRiley 2y agoSure, but none of these are true alternatives because they are missing a lot of features that libraries like GLFW or RGFW have. (They may be good alternatives for certain use-cases)
- Sharlin 2y agoOh, just based on the README I assumed RGFW was more minimal than it actually is.
- colleagueRiley 2y agoMinimal refers to the code itself. GLFW's codebase is ~10MB while RGFW's is about ~300kb. But RGFW tries to support nearly everything that GLFW supports.
- Sharlin 2y agoYeah, my bad :)