3 ms·
> Cross platform full screen is hard. That paragraph is quite fascinating. I mostly work with SDL and Allegro and I've chased a fair share of similar bugs ther
by seba_dos1 4y ago
> Cross platform full screen is hard.
That paragraph is quite fascinating. I mostly work with SDL and Allegro and I've chased a fair share of similar bugs there already on various platforms, most notably fullscreen handling under Wayland, but I never had to care about breaking other platforms with my fixes because platform handling is quite reasonably abstracted away in SDL (and SDL supports a lot of exotic platforms aside of those you mentioned, so it would be pretty much impossible anyway). I don't know winit, I wonder what in its design makes it so troublesome there.
- Animats 4y agoWinit is trying to handle full screen, draggable window with frame and controls, maximized window with frame and controls, maximized window without frame and controls, and minimized window, across various platforms. Then there's the interaction between Winit and the 3D system, which in my case is Rend3/WGPU on top of Vulkan, Metal, OpenGL, or Direct-X. WGPU handles most of the cross platform stuff for 3D. Supported platforms are Mac, Windows, Linux (X11 or Wayland), and Android (Chromebook and phone). Not all the combinations work. To work on this, either someone has to have all the supported hardware, or you need a closely cooperating team who collectively have all the hardware. Mucking about with something like that from the outside is likely to result in breaking something or creating hard to maintain single platform special cases. I'm glad the winit and WGPU teams are doing this. It's important infrastructure used by many projects. It's impressive that it works as well as it does.
- seba_dos1 4y agoSo seems like SDL covers everything Winit does plus much more (including at least some stuff WGPU does), and you really don't need to have all supported hardware to work on bugs in it - which would be a nightmare, since aside from the platforms you mentioned it supports stuff like Haiku, PSP, OS/2, Nokia N-Gage or QNX, and even console SDKs behind NDAs that aren't available publicly. Its video drivers and render backends are all separated from each other. In all my adventures with fixing bugs or implementing new features in its Wayland backend (such as HiDPI support) I never had to touch the platform-independent stuff. Not saying that it doesn't happen in general, but I personally never had to do that. It smells like nothing more than a maturity issue. SDL is almost 25 years old at this point.