logoalt Hacker News

mort96last Sunday at 1:49 PM6 repliesview on HN

Is the rationale for switching away from GLFW documented anywhere? I'd love to read about it, I have some projects which use GLFW myself and I'm always wondering whether or not SDL would be better


Replies

creatonezlast Sunday at 6:29 PM

Not sure, but they were able to get Wayland support working out of the box in this update. Previously it required workarounds, and even with workarounds, new issues would pop up in a game of whack-a-mole, and nobody really cared because running MC in XWayland was good enough for most people. Whereas SDL3 has very solid Wayland support out of the box. Minecraft only really uses GLFW to create the window, set the taskbar icon, go into fullscreen mode, and accept input, with everything else being handled by raw OpenGL, so this was an easy switchover. Now that Minecraft supports Vulkan, it's able to use a fully modern stack on Linux desktops / Steam Decks.

show 1 reply
akazantsevlast Sunday at 3:28 PM

> I'm always wondering whether or not SDL would be better

SDL supports mobile; GLFW doesn't. Maybe they're unifying codebases between the platforms.

Edit: BTW SDL3 still works even on Android 4.2. I made an app using it and ImGui, without any Java.

show 2 replies
LoganDarklast Sunday at 3:51 PM

For one, input method editor support.

dismalaflast Sunday at 1:53 PM

SDL is more of a "platform" you can use anywhere. It includes literally everything you'd want from the OS layer (windowing, graphics, audio, input, network code, threads) whereas GLFW is just windowing, graphics context and input, you need to bring your own audio, network code and threading library. Not a big deal for some but SDL does do more... Plus it's even more portable than GLFW.

show 2 replies
groundzeros2015last Sunday at 2:12 PM

You could make an entire 2D game using the SDL API without OpenGL/vulkan.

show 3 replies