Bindings in zig for Dear ImGui. These are hand written and incomplete for now, while I work on a c++ parser in a side project.
For a more feature complete and less opinonated bindings, see https://github.com/michal-z/zig-gamedev/tree/main/libs/zgui
For complete example, see usage in zig-imgui-template.
Imgui doesnt do much on it own, it relies on a backend to handle rendering, and something to handle windows (and more). This repro has some code prepared for OpenGL3 as backend, and Glfw to handle windowing, via addBackendGlfwOpenGl3
.
const zimgui = @import("deps/zimgui/build.zig");
pub fn build(b: *Builder) void {
var exe = ...;
exe.addPackagePath("zimgui", "deps/zimgui/src/zimgui.zig");
_ = zimgui.link(b, exe, .{.impl_opengl3 = true});
exe.addPackagePath("zimgui_backend", "deps/zimgui/src/backend_glfw_opengl3.zig");
addBackendGlfwOpenGl3(b, exe);
...
}