Reminder: Stage2 compiler and new function pointer syntax.
See here: https://github.com/ziglang/zig/issues/89#issuecomment-1180324510
Changing the bindings manually for the new syntax triggers problems further down though:
- in the stage2 compiler, the triangle sample just renders a blank screen
- more complex samples (e.g. the cube sample) just crash the compiler
- the clear sample works though!
~~In the stage1 compiler, the code compiles with the new function pointer syntax, but then crashes when calling a callback out of the C code.~~ ...this is because stage one interprets the new function point syntax as a function-pointer-pointer.
...all this only tested on an M1 Mac so far.
I made a PR with changes to support the new fn pointer syntax as well as the broken examples (it was a problem with asRange copying the input to the stack, then taking it's address)
here: https://github.com/floooh/sokol/pull/710 and https://github.com/floooh/sokol-zig/pull/26
Ok, it's not in the master branch yet (instead everything is in zig-0.10.0 branches), but I'll close this as fixed :)