Hacker News new | ask | show | jobs
by dismalaf 9 days ago
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.
2 comments

I'm aware of those things, but are those the reasons? Are they actually planning on moving away from their existing audio, networking and threading solutions and switch it out for SDL's implementations? Are they planning on porting Minecraft Java to platforms GLFW doesn't support?
A little AI assisted digging indicates SDL3 has better support for switching between keyboard layout keys and physical keys depending on context (ie. Game controls can be WASD or whatever letters those physical keys are while it can use international keyboard layouts for chat boxes).
Is that why they are doing this? Did your little chat bit tell you anything about Mojang's stated rationale, which is what I asked about?

Also, GLFW reports both the scan code and the key code, just like SDL, so I'm not sure I really trust those technical details either. Usually, you want to use scan code for some things (e.g key binds) and key code for others (e.g typing), so you can't have a global switch.

Well the article doesn't state why so all anyone has is speculation.

Here's a bunch of GLFW questions on Microsoft's website, quite a few are Minecraft related errors: https://learn.microsoft.com/en-us/search/?terms=glfw&categor...

Also do a search for GLFW here: https://bugs.mojang.com/browse/MC

In case you missed it, the question was:

> Is the rationale for switching away from GLFW documented anywhere?

"Not that I know" is a perfectly good answer. Don't spew ChatGPT slop at me.

You're pleasant.

Should I have just said no, RTFA? Which clearly doesn't state why. That better? Or say you can search yourself?

As for ChatGPT slop, I've never used that particular LLM, but some are good for bypassing ads/SEO slop while searching the internet.

SDL3 also includes a "GPU API", that allows low level programming of the GPU, similar to vulkan, though not quite as low level.