Zig-ImGui
Zig-ImGui copied to clipboard
Implements SDL backend with working example using OpenGL 3
Everything this PR does is in the title with a couple of side notes:
- I'm working on Linux with my Zig compiler being set on master
- I took the liberty of cleaning up
build.zig
& moving shaders to a different location - SDL dependency comes from SDL.zig from where I've only copied the required files, I could refactor my fork so it's a submodule.
- I plan on implementing vulkan
Thanks for submitting this! I'm happy to merge it but it needs a few changes first:
- the
SDL.zig/
folder should be moved into theexamples/include/
directory - please restore the trailing newline in
.gitignore
- I should still be able to build the non-SDL examples without installing SDL. I get this message instead when building example_glfw_vulkan:
> zig build example_glfw_vulkan
Could not auto-detect SDL2 sdk configuration. Please provide C:\Users\Martin\Projects\Zig-ImGui\.build_config\sdl.json with the following contents filled out:
{
"x86_64-windows-gnu": {
"include": "<path to sdl2 sdk>/include",
"libs": "<path to sdl2 sdk>/lib",
"bin": "<path to sdl2 sdk>/bin"
}
}
You can obtain a SDL2 sdk for windows from https://www.libsdl.org/download-2.0.php
error: the following build command failed with exit code 1:
C:\Users\Martin\Projects\Zig-ImGui\zig-cache\o\83cb1bbbb8bded64fa9d40dbd38b4b9f\build.exe C:\Program Files\Zig\Current\zig.exe C:\Users\Martin\Projects\Zig-ImGui C:\Users\Martin\Projects\Zig-ImGui\zig-cache C:\Users\Martin\AppData\Local\zig example_glfw_vulkan