diff --git a/flake.nix b/flake.nix index a7649ae..2c5af73 100755 --- a/flake.nix +++ b/flake.nix @@ -32,14 +32,18 @@ buildInputs = with pkgs; [ glfw + glew ]; buildPhase = '' g++ \ src/*.cpp \ + utils/Window/*.cpp utils/Window/WindowGLFW/*.cpp \ + utils/Renderer/*.cpp utils/Renderer/RendererOpenGL/*.cpp \ -I src -I include -I utils \ -DRENDERER_OPENGL \ -DWINDOW_GLFW \ + -lGL -lglfw -lGLEW \ -Wall \ -o $name ''; @@ -182,20 +186,22 @@ buildInputs = with pkgs; [ glfw + glew ]; buildPhase = '' g++ \ modules/TestImgui/src/*.cpp src/App.cpp \ $imgui/backends/imgui_impl_glfw.cpp \ - $imgui/backends/imgui_impl_opengl.cpp \ + $imgui/backends/imgui_impl_opengl3.cpp \ + $imgui/*.cpp \ utils/Renderer/*.cpp utils/Renderer/RendererOpenGL/*.cpp \ utils/Window/*.cpp utils/Window/WindowGLFW/*.cpp \ -DRENDERER_OPENGL \ -DWINDOW_GLFW \ -fpic -shared \ - -I src -I include \ - -I utils \ + -I src -I include -I utils -I $imgui \ + -lGL -lglfw -lGLEW \ -Wall \ -o $name ''; diff --git a/utils/Window/WindowGLFW/WindowGLFW.cpp b/utils/Window/WindowGLFW/WindowGLFW.cpp index 6c1e81d..3700fbd 100644 --- a/utils/Window/WindowGLFW/WindowGLFW.cpp +++ b/utils/Window/WindowGLFW/WindowGLFW.cpp @@ -32,6 +32,10 @@ namespace Archimedes { glfwSwapBuffers(w); } + void WindowGLFW::getSize(int& w, int& h) { + glfwGetFramebufferSize(this->w, &w, &h); + } + WindowGLFW::~WindowGLFW() { glfwTerminate(); }