File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1- find_package (Vulkan REQUIRED)
2-
31set (IMGUI_SRC
42 imgui/imgui.cpp
53 imgui/imgui_draw.cpp
@@ -32,8 +30,11 @@ endif()
3230add_library (imgui ${IMGUI_SRC} )
3331target_include_directories (imgui PUBLIC imgui)
3432
35- target_link_libraries (imgui PUBLIC Vulkan::Vulkan)
36-
3733if (USE_SDL)
3834 target_link_libraries (imgui PUBLIC SDL3::SDL3)
3935endif ()
36+
37+ if (USE_VULKAN)
38+ find_package (Vulkan REQUIRED)
39+ target_link_libraries (imgui PUBLIC Vulkan::Vulkan)
40+ endif ()
Original file line number Diff line number Diff line change 44#include < chrono>
55#include < thread>
66
7+ #ifdef USE_VULKAN
8+ #include < vulkan/vulkan.h>
9+ #endif
10+
711#ifdef USE_SDL
812 #include < SDL3/SDL_vulkan.h>
913
1721 #include < backends/imgui_impl_win32.h>
1822#endif
1923
20- #include < backends/imgui_impl_vulkan.h>
21-
2224
2325WindowSystem::WindowSystem (
2426#ifdef USE_SDL
@@ -55,6 +57,7 @@ WindowSystem::~WindowSystem()
5557}
5658
5759
60+ #ifdef USE_VULKAN
5861void WindowSystem::getVkInstanceExtensions (std::vector<const char *>& extensions) const
5962{
6063#ifdef USE_SDL
@@ -69,6 +72,7 @@ void WindowSystem::getVkInstanceExtensions(std::vector<const char*>& extensions)
6972 extensions.push_back (" VK_KHR_win32_surface" );
7073#endif
7174}
75+ #endif
7276
7377
7478void WindowSystem::collectEvents ()
You can’t perform that action at this time.
0 commit comments