Use SDL for ImGui
This commit is contained in:
@@ -41,6 +41,7 @@ IndentCaseBlocks: true
|
|||||||
InsertNewlineAtEOF: true
|
InsertNewlineAtEOF: true
|
||||||
MacroBlockBegin: ''
|
MacroBlockBegin: ''
|
||||||
MacroBlockEnd: ''
|
MacroBlockEnd: ''
|
||||||
|
SortIncludes: Never
|
||||||
MaxEmptyLinesToKeep: 2
|
MaxEmptyLinesToKeep: 2
|
||||||
NamespaceIndentation: Inner
|
NamespaceIndentation: Inner
|
||||||
SpaceInEmptyParentheses: false
|
SpaceInEmptyParentheses: false
|
||||||
|
|||||||
10
external/imgui/CMakeLists.txt
vendored
Normal file
10
external/imgui/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
project(imgui)
|
||||||
|
|
||||||
|
file(GLOB SOURCES *.cpp)
|
||||||
|
file(GLOB HEADERS *.h)
|
||||||
|
|
||||||
|
list(APPEND SOURCES backends/imgui_impl_sdl3.cpp backends/imgui_impl_vulkan.cpp)
|
||||||
|
|
||||||
|
add_library(imgui ${SOURCES} ${HEADERS})
|
||||||
|
target_include_directories(imgui PRIVATE . backends ../SDL/include)
|
||||||
|
target_compile_definitions(imgui PUBLIC IMGUI_IMPL_VULKAN_USE_VOLK)
|
||||||
@@ -36,6 +36,8 @@ include_directories(
|
|||||||
../../external/parallel-rdp/parallel-rdp-standalone/util
|
../../external/parallel-rdp/parallel-rdp-standalone/util
|
||||||
../../external/unarr
|
../../external/unarr
|
||||||
../../external/SDL/include
|
../../external/SDL/include
|
||||||
|
../../external/imgui
|
||||||
|
../../external/imgui/backends
|
||||||
)
|
)
|
||||||
|
|
||||||
option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." OFF)
|
option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." OFF)
|
||||||
|
|||||||
@@ -6,6 +6,12 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QWindow>
|
#include <QWindow>
|
||||||
|
|
||||||
|
#include <imgui.h>
|
||||||
|
#include <imgui_impl_sdl3.h>
|
||||||
|
#include <imgui_impl_vulkan.h>
|
||||||
|
#include <SDL3/SDL.h>
|
||||||
|
#include <SDL3/SDL_vulkan.h>
|
||||||
|
|
||||||
struct QtInstanceFactory : Vulkan::InstanceFactory {
|
struct QtInstanceFactory : Vulkan::InstanceFactory {
|
||||||
VkInstance create_instance(const VkInstanceCreateInfo *info) override {
|
VkInstance create_instance(const VkInstanceCreateInfo *info) override {
|
||||||
qVkInstance.setApiVersion({1, 3, 0});
|
qVkInstance.setApiVersion({1, 3, 0});
|
||||||
|
|||||||
Reference in New Issue
Block a user