Closed tanis2000 closed 2 years ago
Just define SOKOL_GLCORE33 so that it is visible in the implementation (most robust way is to pass this as compiler option, e.g. on gcc/clang -DSOKOL_GLCORE33
or on MSVC /DSOKOL_GLCORE33
) that way, if you're using different sokol headers, all will automatically select the same backend.
Ooops wait... we're in sokol-zig here lol, sorry...
Yeah, currently the backend is hardwired to Metal on macOS. You need to fix the backend manually here:
https://github.com/floooh/sokol-zig/blob/master/src/sokol/c/sokol_defines.h
I should probably make this more flexible via build.zig.
Ok, it's now possible to force the GL backend on macOS or Windows like this:
zig build -Dgl=true run-clear
...so far tested on macOS, but will also test on Windows now.
...oops, fails on Windows... fixing...
Ok, Windows and Linux fixed, was a stupid oversight.
I believe you forgot to set the Backend enum to public :)
ah right, one sec
awesome! thank you for the quick fix! :)
Is it just me or it looks like there is no way to force sokol to use OpenGL when compiling for macOS?