mach/imgui - dear imgui bindings for Mach engine
This repository contains community-maintained Dear Imgui bindings for Mach engine. Works on Windows, Linux, and macOS with zero-fuss cross-compilation & more.
git clone --recursive https://github.com/machlibs/imgui
cd imgui/
zig build run-example-basicFirst create a Mach engine project, then in a libs subdirectory of your repo root add the dependency:
git clone --recursive https://github.com/machlibs/imguiThen in your build.zig add:
...
const imgui = @import("libs/imgui/build.zig");
pub fn build(b: *Builder) void {
...
exe.addPackage(imgui.getPkg(&[_]std.build.Pkg{}));
imgui.link(b, exe, .{});
}Join the Mach community on Discord or Matrix to discuss this project, ask questions, get help, etc.
- imgui_c_keys.h - c header file with Imgui keys enum is used to map mach keys to imgui keys.
- zgui_mach.zig - mach backend implementation for zgui
- main.zig - main file that provides backend and imgui bindings (copied from zgui)
- zgui.cpp and zgui.zig - imgui cpp bindings to zig functions (copied from zgui)
- Based on michal-z's zgui
- Mach integration originally by @SergeiSomin