Re:Perfecting GLFW for Zig, and finding lurking undefined be...
by losvedir on Sunday October 31, 2021 @04:56PM
(#29060347)
Can anyone provide some context? I don't know what GLFW is, and the blog post doesn't really explain. From Googling, I see what it is now, but I don't really have a sense of how important GLFW bindings are. Is this very niche? Or, like is this a major contribution to game development? For that matter, is this mainly going to help Zig game developers, or is this a bit of tooling for everyone, kind of like zig cc?
[ Parent
| on HN ]
Re:Perfecting GLFW for Zig, and finding lurking undefined be...
by slimsag on Sunday October 31, 2021 @04:59PM
(#29060372)
Author here, sorry for the missing context. GLFW is very popular among game developers for opening graphics windows in a cross-platform way.
This helps just Zig game developers for now, it's not a major contribution to game development (though I hope other things I do with Mach engine in the future will be.)
I do think with some minor tweaks this could be used to make bindings for GLFW in other languages easier to install, e.g. by just requiring `zig`, but I haven't done that here.
Re:Perfecting GLFW for Zig, and finding lurking undefined be...
by losvedir on Sunday October 31, 2021 @06:41PM
(#29061177)
Thanks! No need to apologize, I'm not in your target audience, and that's fine. Was just curious, is all.
Re:Perfecting GLFW for Zig, and finding lurking undefined be...
by hsn915 on Sunday October 31, 2021 @05:21PM
(#29060563)
glfw is very widely known because it's usually one of the recommended libraries to use when starting out graphics programming. It basically a cross platform library to create a window and initialize an opengl context .. or something like that. (It's been _many_ years since I last used it).
Re:Perfecting GLFW for Zig, and finding lurking undefined be...
by iamcreasy on Sunday October 31, 2021 @05:30PM
(#29060643)
Is it safe to say that SDL is a strict superset of GLFW?
Re:Perfecting GLFW for Zig, and finding lurking undefined be...
by slimsag on Sunday October 31, 2021 @06:08PM
(#29060920)
I think that is a reasonable statement. SDL includes other functionality like image loading, audio, etc. whereas GLFW is primarily focused just with getting a window with a graphics context for OpenGL/Vulkan/etc set up.
Re:Perfecting GLFW for Zig, and finding lurking undefined be...
by cyber_kinetist on Monday November 01, 2021 @12:18AM
(#29062956)
SDL’s advantage is that it supports more platforms (like mobile and Switch), and is much more battle-tested with hundreds of games using it, including Valve’s ones. Many people seem to use SDL for only windowing and input and seem okay with it.
Re:Perfecting GLFW for Zig, and finding lurking undefined be...
by bmitc on Monday November 01, 2021 @01:01AM
(#29063153)
This documentation has a good description of capabilities of it and alternatives.
https://www.khronos.org/opengl/wiki/Related_toolkits_and_API...