wrap imgui impl funcs

This commit is contained in:
2025-05-04 22:51:45 -05:00
parent 853881e5e8
commit 2820387851
4 changed files with 136 additions and 78 deletions

View File

@@ -114,7 +114,8 @@
-DRENDERER_OPENGL \
-DWINDOW_SDL3 \
-DWINDOWMODULE_DYNAMIC \
-lGL -lsdl -lGLEW \
-lGL -lGLEW \
`sdl3-config --cflags --libs` \
-Wall \
-o $name
'';
@@ -161,6 +162,51 @@
};
ImguiModuleSDL = pkgs.stdenvNoCC.mkDerivation {
name = "ImguiModule";
src = ./.;
imgui = inputs.imgui;
nativeBuildInputs = with pkgs; [
clang
];
buildInputs = with pkgs; [
sdl3
glew
];
buildPhase = ''
clang++ \
modules/ImguiModule/src/*.cpp \
modules/WindowModule/src/*.cpp \
$imgui/backends/imgui_impl_sdl3.cpp \
$imgui/backends/imgui_impl_opengl3.cpp \
$imgui/misc/cpp/*.cpp \
$imgui/*.cpp \
-DRENDERER_OPENGL \
-DWINDOW_SDL3 \
-DIMGUIMODULE_DYNAMIC \
-DCUSTOMFONT=${pkgs.fira-code}/share/fonts/truetype/FiraCode-VF.ttf \
-fpic -shared \
-I src -I include -I $imgui -I . \
-lGL -lGLEW \
`sdl3-config --cflags --libs` \
-Wall \
-o $name
'';
installPhase = ''
mkdir -p $out/bin
cp $name $out/bin
'';
};
ImguiModule = pkgs.stdenvNoCC.mkDerivation {
name = "ImguiModule";