debug TestImgui
This commit is contained in:
12
flake.nix
12
flake.nix
@@ -32,14 +32,18 @@
|
|||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
glfw
|
glfw
|
||||||
|
glew
|
||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
g++ \
|
g++ \
|
||||||
src/*.cpp \
|
src/*.cpp \
|
||||||
|
utils/Window/*.cpp utils/Window/WindowGLFW/*.cpp \
|
||||||
|
utils/Renderer/*.cpp utils/Renderer/RendererOpenGL/*.cpp \
|
||||||
-I src -I include -I utils \
|
-I src -I include -I utils \
|
||||||
-DRENDERER_OPENGL \
|
-DRENDERER_OPENGL \
|
||||||
-DWINDOW_GLFW \
|
-DWINDOW_GLFW \
|
||||||
|
-lGL -lglfw -lGLEW \
|
||||||
-Wall \
|
-Wall \
|
||||||
-o $name
|
-o $name
|
||||||
'';
|
'';
|
||||||
@@ -182,20 +186,22 @@
|
|||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
glfw
|
glfw
|
||||||
|
glew
|
||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
g++ \
|
g++ \
|
||||||
modules/TestImgui/src/*.cpp src/App.cpp \
|
modules/TestImgui/src/*.cpp src/App.cpp \
|
||||||
$imgui/backends/imgui_impl_glfw.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/Renderer/*.cpp utils/Renderer/RendererOpenGL/*.cpp \
|
||||||
utils/Window/*.cpp utils/Window/WindowGLFW/*.cpp \
|
utils/Window/*.cpp utils/Window/WindowGLFW/*.cpp \
|
||||||
-DRENDERER_OPENGL \
|
-DRENDERER_OPENGL \
|
||||||
-DWINDOW_GLFW \
|
-DWINDOW_GLFW \
|
||||||
-fpic -shared \
|
-fpic -shared \
|
||||||
-I src -I include \
|
-I src -I include -I utils -I $imgui \
|
||||||
-I utils \
|
-lGL -lglfw -lGLEW \
|
||||||
-Wall \
|
-Wall \
|
||||||
-o $name
|
-o $name
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ namespace Archimedes {
|
|||||||
glfwSwapBuffers(w);
|
glfwSwapBuffers(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WindowGLFW::getSize(int& w, int& h) {
|
||||||
|
glfwGetFramebufferSize(this->w, &w, &h);
|
||||||
|
}
|
||||||
|
|
||||||
WindowGLFW::~WindowGLFW() {
|
WindowGLFW::~WindowGLFW() {
|
||||||
glfwTerminate();
|
glfwTerminate();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user