-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Just getting into zgui, and trying to create some imgui component with it, but seems I have some problems on building the project using .sdl3 as a backend:
My Project Setup:
I was trying to replicate the original bgfx hello world example in windows 11, involving bgfx, sdl3, and imgui (linked with the zig equivalence). So far the logo, the text and the backend are properly loaded, but I have been struggling on loading zgui component into the project.
Since this is the SDL project, I firstly intuitively loaded the .backend for the b.dependency as ".sdl3" as shown:
const zgui = b.dependency("zgui", .{
.shared = false,
.optimize = optimize,
.backend = .sdl3,
});
exe_mod.addImport("zgui", zgui.module("root"));
exe.linkLibrary(zgui.artifact("imgui"));
However, I have ended up with a build error, stating that SDL3/SDL.h is missing from the library:
C:\Users\{users}\AppData\Local\zig\p\zgui-0.6.0-dev--L6sZBDaaAAs88V6Y7ALQ_OU1KHG88hUYlKlrJdMEGsD\libs/imgui/backends/imgui_impl_sdl3.cpp:67:10: error: 'SDL3/SDL.h' file not found
#include <SDL3/SDL.h>
Because of that problem, I have switched the backend from .sdl3 to .sdl3gpu, and default my shader to vulkan only, and the library built without any issues, but I have another problem which I will open up another issues for a discussion.