glad
glad copied to clipboard
Zig Generator
I tried to work on a Zig generator myself, but wasn't able to make sense of the Python code.
I would hope for something like https://github.com/Iridescence-Technologies/zglfw/blob/master/src/glfw.zig, which returns errors and such explicitly, but also something like https://github.com/Snektron/vulkan-zig or https://github.com/ziglibs/zgl with the concise naming and more proper typing.
I would implement it myself except for my previously mentioned inability to easily understand Python. I'm more than happy to help if syntax help is required.
The C code should be nearly directly translatable, except:
- the
gl
orGL_
preceding things can be dropped, as seen invulkan-zig
- there are things that would make more sense as "instance methods" like in
zgl
(and I thinkvulkan-zig
does this fully automatically?)
I'm thinking about https://github.com/ziglibs/zlm as well, being designed specifically to work with OpenGL, if a link to it is any helpful.
I followed what GLAD's C source code looked like and manually crafted https://github.com/s5bug/zglt/blob/master/src/zglt.zig: I'm hoping that something like this is simple enough for GLAD to generate? My naming for a few things might be a little off, but I hope what I've written is understandable.
I closed the PR, I will integrate plugins into the web generator but I cannot maintain more languages
👍 I don't use Zig anymore, but I'll leave my changes up in case someone in the future can make use of them.