Compare commits

..

2 commits

Author SHA1 Message Date
Mars 4a4939e65b stop writing imgui.ini 2024-10-18 13:35:59 -04:00
Mars 52123f27ac fix build on windows 2024-10-18 13:35:50 -04:00
2 changed files with 18 additions and 3 deletions

View file

@ -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,
)
)

View file

@ -342,6 +342,14 @@ class VulkanApp {
IMGUI_CHECKVERSION();
ImGui::CreateContext();
// Remember to use a reference here, otherwise
// the ImGui::GetIO() function will return a
// copy and the changes won't be saved.
ImGuiIO& imGuiIO = ImGui::GetIO();
// Disable writing imgui.ini
imGuiIO.IniFilename = nullptr;
// Setup Dear ImGui style
ImGui::StyleColorsDark();
@ -370,7 +378,7 @@ class VulkanApp {
.Queue = mGraphicsQueue,
.DescriptorPool = mImGuiDescriptorPool.get(),
.RenderPass = mRenderPass.get(),
.MinImageCount = 1,
.MinImageCount = MAX_FRAMES_IN_FLIGHT,
.ImageCount = static_cast<uint32_t>(mSwapChainImages.size()),
.MSAASamples = static_cast<VkSampleCountFlagBits>(mMsaaSamples),
.PipelineCache = VK_NULL_HANDLE,