From 52123f27ac94ee2769eadb5a52ebae09d1ebb7a0 Mon Sep 17 00:00:00 2001 From: Mars Date: Fri, 18 Oct 2024 13:35:50 -0400 Subject: [PATCH] fix build on windows --- meson.build | 11 +++++++++-- src/main.cpp | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index afeebad..9e1b394 100644 --- a/meson.build +++ b/meson.build @@ -29,12 +29,19 @@ deps = [ dependency('glfw3', include_type: 'system'), dependency('glm', include_type: 'system'), dependency('vulkan', include_type: 'system'), - cpp.find_library('imgui'), ] +imgui_dep = dependency('imgui', required: false, include_type: 'system') + +if not imgui_dep.found() + imgui_dep = cpp.find_library('imgui', required: true) +endif + +deps += imgui_dep + executable( 'graphics-test', sources: files('src/main.cpp'), include_directories: include_directories('include', is_system: true), dependencies: deps, -) +) \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index b860068..52d0de2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -370,7 +370,7 @@ class VulkanApp { .Queue = mGraphicsQueue, .DescriptorPool = mImGuiDescriptorPool.get(), .RenderPass = mRenderPass.get(), - .MinImageCount = 1, + .MinImageCount = MAX_FRAMES_IN_FLIGHT, .ImageCount = static_cast(mSwapChainImages.size()), .MSAASamples = static_cast(mMsaaSamples), .PipelineCache = VK_NULL_HANDLE,