diff --git a/ExampleApps.nix b/ExampleApps.nix index ebc221b..ec22ca0 100644 --- a/ExampleApps.nix +++ b/ExampleApps.nix @@ -49,6 +49,7 @@ clang++ \ src/example_apps/ImguiEmbed/*.cpp \ modules/examples/GuiModules/TestImgui/src/*.cpp \ + modules/WindowModule/src/*.cpp \ $imgui/backends/imgui_impl_glfw.cpp \ $imgui/backends/imgui_impl_opengl3.cpp \ $imgui/*.cpp \ diff --git a/flake.nix b/flake.nix index 51b8a9e..492a9ef 100755 --- a/flake.nix +++ b/flake.nix @@ -37,7 +37,7 @@ buildInputs = with pkgs; [ glfw - glew + glew ]; buildPhase = '' @@ -50,9 +50,9 @@ -lGL -lglfw -lGLEW \ -Wall \ -o $name - ''; + ''; - installPhase = '' + installPhase = '' mkdir -p $out/bin cp $name $out/bin ''; diff --git a/include/utils/App/App.h b/include/utils/App/App.h index 6056b92..811c0b4 100644 --- a/include/utils/App/App.h +++ b/include/utils/App/App.h @@ -43,11 +43,11 @@ namespace Archimedes { private: - bool done = false; - inline static App* instance = nullptr; protected: + + bool done = false; std::list modules; std::list toClose; diff --git a/include/utils/GuiModule/GuiModule.h b/include/utils/GuiModule/GuiModule.h index c07415f..3b7efb8 100644 --- a/include/utils/GuiModule/GuiModule.h +++ b/include/utils/GuiModule/GuiModule.h @@ -5,7 +5,6 @@ #define WINDOWMODULE_STATIC #include "modules/WindowModule/src/WindowModule.h" -#include "modules/WindowModule/src/WindowModule.cpp" namespace Archimedes { @@ -22,8 +21,6 @@ namespace Archimedes { virtual void onLoad() = 0; virtual void run() = 0; - Window* getWindow() { return windowModule; } - protected: WindowModule* windowModule; }; diff --git a/modules/WindowModule/src/WindowModule.h b/modules/WindowModule/src/WindowModule.h index 8e66e00..0659c31 100644 --- a/modules/WindowModule/src/WindowModule.h +++ b/modules/WindowModule/src/WindowModule.h @@ -18,7 +18,7 @@ class WindowModule : public Archimedes::Module { //interface for other modules std::list::iterator addRenderCmd(Archimedes::Renderer::renderCmd* cmd) { - renderer->addRenderCmd(cmd); + return renderer->addRenderCmd(cmd); } void removeRenderCmd(std::list::iterator cmd) { diff --git a/src/example_apps/ImguiEmbed/ImguiEmbed.h b/src/example_apps/ImguiEmbed/ImguiEmbed.h index d1fc08e..5710ed0 100644 --- a/src/example_apps/ImguiEmbed/ImguiEmbed.h +++ b/src/example_apps/ImguiEmbed/ImguiEmbed.h @@ -1,7 +1,7 @@ #define ENTRYPOINT #include "Archimedes.h" -#include "modules/GUImodules/TestImgui/src/TestImgui.h" +#include "modules/examples/GuiModules/TestImgui/src/TestImgui.h" class ImguiEmbed : public Archimedes::App {