diff --git a/CMakeLists.txt b/CMakeLists.txt index fba9381..31ff757 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.26) project(towards) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_STANDARD_REQUIRED ON) include(cmake/CompilerOptions.cmake) include(cmake/Dependencies.cmake) @@ -50,8 +52,6 @@ target_link_libraries(${PROJECT_NAME} Jolt tl::expected Tracy::TracyClient - pqxx - pq ) include(cmake/Modules.cmake) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index a7577e6..ac53bb1 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -4,8 +4,9 @@ set(LFT_ENABLE_EXAMPLES OFF CACHE BOOL "Disable loft examples" FORCE) set(FASTNOISE2_NOISETOOL OFF CACHE BOOL "Disable FastNoise2 graph tool" FORCE) find_package(Vulkan REQUIRED) -find_package(SDL2 REQUIRED) -find_package(Protobuf CONFIG REQUIRED) +find_package(SDL3 CONFIG REQUIRED) +find_library(LIBDECOR_LIB decor-0) +find_package(Protobuf CONFIG REQUIRED VERSION 3.75) include(FetchContent) set(CMAKE_CONFIGURATION_TYPES "Debug;Release;Distribution") diff --git a/conanfile.txt b/conanfile.txt index 05dada6..c475c0a 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -1,14 +1,28 @@ [requires] protobuf/7.35.0 -sdl/2.32.10 +sdl/3.4.8 [tool_requires] protobuf/7.35.0 [options] -sdl/*:pulse=False -libffi/*:shared=True +protobuf/*:shared=False +sdl/*:shared=False +sdl/*:camera=False +sdl/*:dialog=False +sdl/*:tray=False +sdl/*:sensor=False +sdl/*:alsa=True +sdl/*:pulseaudio=False +sdl/*:sndio=False +sdl/*:opengl=False +sdl/*:opengles=False +sdl/*:vulkan=True +sdl/*:joystick=False +sdl/*:haptic=False +sdl/*:hidapi=False [generators] CMakeDeps CMakeToolchain + diff --git a/external/imgui/CMakeLists.txt b/external/imgui/CMakeLists.txt index b7e4949..307a772 100644 --- a/external/imgui/CMakeLists.txt +++ b/external/imgui/CMakeLists.txt @@ -3,10 +3,9 @@ project(imgui) file(GLOB FILES ./*.cpp ./backends/imgui_impl_vulkan.cpp - ./backends/imgui_impl_sdl2.cpp + ./backends/imgui_impl_sdl3.cpp ) -find_package(SDL2 QUIET) find_package(Vulkan REQUIRED) add_library(${PROJECT_NAME} OBJECT ${FILES}) @@ -21,11 +20,10 @@ target_include_directories(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME} PUBLIC volk::volk - ${SDL2_LIBRARIES} + sdl::sdl ) target_include_directories(${PROJECT_NAME} PRIVATE ${volk_INCLUDE_DIRS} - ${SDL2_INCLUDE_DIRS} ) diff --git a/external/implot/CMakeLists.txt b/external/implot/CMakeLists.txt index 68a2134..d787fa0 100644 --- a/external/implot/CMakeLists.txt +++ b/external/implot/CMakeLists.txt @@ -25,7 +25,7 @@ target_include_directories(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME} PUBLIC volk::volk - ${SDL2_LIBRARIES} + sdl::sdl imgui::imgui ) # diff --git a/external/loft/CMakeLists.txt b/external/loft/CMakeLists.txt index 9cae55c..7793894 100644 --- a/external/loft/CMakeLists.txt +++ b/external/loft/CMakeLists.txt @@ -5,13 +5,13 @@ option(LFT_ENABLE_EXAMPLES "Enable building examples" ON) if (WIN32) set(VOLK_STATIC_DEFINES VK_USE_PLATFORM_WIN32_KHR) elseif(UNIX) - set(VOLK_STATIC_DEFINES VK_USE_PLATFORM_XCB_KHR) + set(VOLK_STATIC_DEFINES VK_USE_PLATFORM_XCB_KHR VK_USE_PLATFORM_WAYLAND_KHR) endif() # Please set default paths for vulkan and SDL2 set(VULKAN_PATH "$ENV{VULKAN_SDK}" CACHE STRING "Path to vulkan directory") -set(SDL2_PATH "$ENV{VULKAN_SDK}/cmake" CACHE STRING "Path to SDL2 directory") +# set(SDL2_PATH "$ENV{VULKAN_SDK}/cmake" CACHE STRING "Path to SDL2 directory") list(APPEND CMAKE_PREFIX_PATH "$ENV{VULKAN_SDK}/cmake") diff --git a/external/loft/Makefile b/external/loft/Makefile deleted file mode 100644 index 8962041..0000000 --- a/external/loft/Makefile +++ /dev/null @@ -1,140 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.30 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -# Allow only one "make -f Makefile2" at a time, but pass parallelism. -.NOTPARALLEL: - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - -# Disable VCS-based implicit rules. -% : %,v - -# Disable VCS-based implicit rules. -% : RCS/% - -# Disable VCS-based implicit rules. -% : RCS/%,v - -# Disable VCS-based implicit rules. -% : SCCS/s.% - -# Disable VCS-based implicit rules. -% : s.% - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Command-line flag to silence nested $(MAKE). -$(VERBOSE)MAKESILENT = -s - -#Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/bin/cmake - -# The command to remove a file. -RM = /usr/bin/cmake -E rm -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/martin/projects/mmo - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/martin/projects/mmo - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." - /usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." - /usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# The main all target -all: cmake_check_build_system - cd /home/martin/projects/mmo && $(CMAKE_COMMAND) -E cmake_progress_start /home/martin/projects/mmo/CMakeFiles /home/martin/projects/mmo/external/loft//CMakeFiles/progress.marks - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/all - $(CMAKE_COMMAND) -E cmake_progress_start /home/martin/projects/mmo/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - cd /home/martin/projects/mmo && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... rebuild_cache" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - cd /home/martin/projects/mmo && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/external/loft/examples/viewer/CMakeLists.txt b/external/loft/examples/viewer/CMakeLists.txt index 77e1928..baa2e97 100644 --- a/external/loft/examples/viewer/CMakeLists.txt +++ b/external/loft/examples/viewer/CMakeLists.txt @@ -111,7 +111,7 @@ target_link_libraries( target_link_libraries( ${PROJECT_NAME} PRIVATE - ${SDL2_LIBRARIES} + sdl::sdl ) get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) diff --git a/external/loft/examples/viewer/external/imgui/CMakeLists.txt b/external/loft/examples/viewer/external/imgui/CMakeLists.txt index b76522b..27aa057 100644 --- a/external/loft/examples/viewer/external/imgui/CMakeLists.txt +++ b/external/loft/examples/viewer/external/imgui/CMakeLists.txt @@ -17,7 +17,8 @@ target_include_directories(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME} PUBLIC volk::volk - ${SDL2_LIBRARIES}) + sdl::sdl +) target_include_directories(${PROJECT_NAME} PUBLIC diff --git a/external/loft/modules/base/Makefile b/external/loft/modules/base/Makefile deleted file mode 100644 index c9e1124..0000000 --- a/external/loft/modules/base/Makefile +++ /dev/null @@ -1,560 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.30 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -# Allow only one "make -f Makefile2" at a time, but pass parallelism. -.NOTPARALLEL: - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - -# Disable VCS-based implicit rules. -% : %,v - -# Disable VCS-based implicit rules. -% : RCS/% - -# Disable VCS-based implicit rules. -% : RCS/%,v - -# Disable VCS-based implicit rules. -% : SCCS/s.% - -# Disable VCS-based implicit rules. -% : s.% - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Command-line flag to silence nested $(MAKE). -$(VERBOSE)MAKESILENT = -s - -#Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/bin/cmake - -# The command to remove a file. -RM = /usr/bin/cmake -E rm -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/martin/projects/mmo - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/martin/projects/mmo - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." - /usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." - /usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# The main all target -all: cmake_check_build_system - cd /home/martin/projects/mmo && $(CMAKE_COMMAND) -E cmake_progress_start /home/martin/projects/mmo/CMakeFiles /home/martin/projects/mmo/external/loft/modules/base//CMakeFiles/progress.marks - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/modules/base/all - $(CMAKE_COMMAND) -E cmake_progress_start /home/martin/projects/mmo/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/modules/base/clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/modules/base/preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/modules/base/preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - cd /home/martin/projects/mmo && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -# Convenience name for target. -external/loft/modules/base/CMakeFiles/loft_base.dir/rule: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 external/loft/modules/base/CMakeFiles/loft_base.dir/rule -.PHONY : external/loft/modules/base/CMakeFiles/loft_base.dir/rule - -# Convenience name for target. -loft_base: external/loft/modules/base/CMakeFiles/loft_base.dir/rule -.PHONY : loft_base - -# fast build rule for target. -loft_base/fast: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/build -.PHONY : loft_base/fast - -src/FramebufferBuilder.o: src/FramebufferBuilder.cpp.o -.PHONY : src/FramebufferBuilder.o - -# target to build an object file -src/FramebufferBuilder.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/FramebufferBuilder.cpp.o -.PHONY : src/FramebufferBuilder.cpp.o - -src/FramebufferBuilder.i: src/FramebufferBuilder.cpp.i -.PHONY : src/FramebufferBuilder.i - -# target to preprocess a source file -src/FramebufferBuilder.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/FramebufferBuilder.cpp.i -.PHONY : src/FramebufferBuilder.cpp.i - -src/FramebufferBuilder.s: src/FramebufferBuilder.cpp.s -.PHONY : src/FramebufferBuilder.s - -# target to generate assembly for a file -src/FramebufferBuilder.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/FramebufferBuilder.cpp.s -.PHONY : src/FramebufferBuilder.cpp.s - -src/Gpu.o: src/Gpu.cpp.o -.PHONY : src/Gpu.o - -# target to build an object file -src/Gpu.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/Gpu.cpp.o -.PHONY : src/Gpu.cpp.o - -src/Gpu.i: src/Gpu.cpp.i -.PHONY : src/Gpu.i - -# target to preprocess a source file -src/Gpu.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/Gpu.cpp.i -.PHONY : src/Gpu.cpp.i - -src/Gpu.s: src/Gpu.cpp.s -.PHONY : src/Gpu.s - -# target to generate assembly for a file -src/Gpu.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/Gpu.cpp.s -.PHONY : src/Gpu.cpp.s - -src/Instance.o: src/Instance.cpp.o -.PHONY : src/Instance.o - -# target to build an object file -src/Instance.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/Instance.cpp.o -.PHONY : src/Instance.cpp.o - -src/Instance.i: src/Instance.cpp.i -.PHONY : src/Instance.i - -# target to preprocess a source file -src/Instance.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/Instance.cpp.i -.PHONY : src/Instance.cpp.i - -src/Instance.s: src/Instance.cpp.s -.PHONY : src/Instance.s - -# target to generate assembly for a file -src/Instance.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/Instance.cpp.s -.PHONY : src/Instance.cpp.s - -src/io/file.o: src/io/file.cpp.o -.PHONY : src/io/file.o - -# target to build an object file -src/io/file.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/io/file.cpp.o -.PHONY : src/io/file.cpp.o - -src/io/file.i: src/io/file.cpp.i -.PHONY : src/io/file.i - -# target to preprocess a source file -src/io/file.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/io/file.cpp.i -.PHONY : src/io/file.cpp.i - -src/io/file.s: src/io/file.cpp.s -.PHONY : src/io/file.s - -# target to generate assembly for a file -src/io/file.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/io/file.cpp.s -.PHONY : src/io/file.cpp.s - -src/resources/Buffer.o: src/resources/Buffer.cpp.o -.PHONY : src/resources/Buffer.o - -# target to build an object file -src/resources/Buffer.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/Buffer.cpp.o -.PHONY : src/resources/Buffer.cpp.o - -src/resources/Buffer.i: src/resources/Buffer.cpp.i -.PHONY : src/resources/Buffer.i - -# target to preprocess a source file -src/resources/Buffer.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/Buffer.cpp.i -.PHONY : src/resources/Buffer.cpp.i - -src/resources/Buffer.s: src/resources/Buffer.cpp.s -.PHONY : src/resources/Buffer.s - -# target to generate assembly for a file -src/resources/Buffer.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/Buffer.cpp.s -.PHONY : src/resources/Buffer.cpp.s - -src/resources/BufferBusWriter.o: src/resources/BufferBusWriter.cpp.o -.PHONY : src/resources/BufferBusWriter.o - -# target to build an object file -src/resources/BufferBusWriter.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/BufferBusWriter.cpp.o -.PHONY : src/resources/BufferBusWriter.cpp.o - -src/resources/BufferBusWriter.i: src/resources/BufferBusWriter.cpp.i -.PHONY : src/resources/BufferBusWriter.i - -# target to preprocess a source file -src/resources/BufferBusWriter.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/BufferBusWriter.cpp.i -.PHONY : src/resources/BufferBusWriter.cpp.i - -src/resources/BufferBusWriter.s: src/resources/BufferBusWriter.cpp.s -.PHONY : src/resources/BufferBusWriter.s - -# target to generate assembly for a file -src/resources/BufferBusWriter.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/BufferBusWriter.cpp.s -.PHONY : src/resources/BufferBusWriter.cpp.s - -src/resources/DefaultAllocator.o: src/resources/DefaultAllocator.cpp.o -.PHONY : src/resources/DefaultAllocator.o - -# target to build an object file -src/resources/DefaultAllocator.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/DefaultAllocator.cpp.o -.PHONY : src/resources/DefaultAllocator.cpp.o - -src/resources/DefaultAllocator.i: src/resources/DefaultAllocator.cpp.i -.PHONY : src/resources/DefaultAllocator.i - -# target to preprocess a source file -src/resources/DefaultAllocator.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/DefaultAllocator.cpp.i -.PHONY : src/resources/DefaultAllocator.cpp.i - -src/resources/DefaultAllocator.s: src/resources/DefaultAllocator.cpp.s -.PHONY : src/resources/DefaultAllocator.s - -# target to generate assembly for a file -src/resources/DefaultAllocator.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/DefaultAllocator.cpp.s -.PHONY : src/resources/DefaultAllocator.cpp.s - -src/resources/Image.o: src/resources/Image.cpp.o -.PHONY : src/resources/Image.o - -# target to build an object file -src/resources/Image.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/Image.cpp.o -.PHONY : src/resources/Image.cpp.o - -src/resources/Image.i: src/resources/Image.cpp.i -.PHONY : src/resources/Image.i - -# target to preprocess a source file -src/resources/Image.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/Image.cpp.i -.PHONY : src/resources/Image.cpp.i - -src/resources/Image.s: src/resources/Image.cpp.s -.PHONY : src/resources/Image.s - -# target to generate assembly for a file -src/resources/Image.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/Image.cpp.s -.PHONY : src/resources/Image.cpp.s - -src/resources/ImageBusWriter.o: src/resources/ImageBusWriter.cpp.o -.PHONY : src/resources/ImageBusWriter.o - -# target to build an object file -src/resources/ImageBusWriter.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/ImageBusWriter.cpp.o -.PHONY : src/resources/ImageBusWriter.cpp.o - -src/resources/ImageBusWriter.i: src/resources/ImageBusWriter.cpp.i -.PHONY : src/resources/ImageBusWriter.i - -# target to preprocess a source file -src/resources/ImageBusWriter.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/ImageBusWriter.cpp.i -.PHONY : src/resources/ImageBusWriter.cpp.i - -src/resources/ImageBusWriter.s: src/resources/ImageBusWriter.cpp.s -.PHONY : src/resources/ImageBusWriter.s - -# target to generate assembly for a file -src/resources/ImageBusWriter.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/ImageBusWriter.cpp.s -.PHONY : src/resources/ImageBusWriter.cpp.s - -src/resources/ImageView.o: src/resources/ImageView.cpp.o -.PHONY : src/resources/ImageView.o - -# target to build an object file -src/resources/ImageView.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/ImageView.cpp.o -.PHONY : src/resources/ImageView.cpp.o - -src/resources/ImageView.i: src/resources/ImageView.cpp.i -.PHONY : src/resources/ImageView.i - -# target to preprocess a source file -src/resources/ImageView.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/ImageView.cpp.i -.PHONY : src/resources/ImageView.cpp.i - -src/resources/ImageView.s: src/resources/ImageView.cpp.s -.PHONY : src/resources/ImageView.s - -# target to generate assembly for a file -src/resources/ImageView.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/ImageView.cpp.s -.PHONY : src/resources/ImageView.cpp.s - -src/resources/MipmapGenerator.o: src/resources/MipmapGenerator.cpp.o -.PHONY : src/resources/MipmapGenerator.o - -# target to build an object file -src/resources/MipmapGenerator.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/MipmapGenerator.cpp.o -.PHONY : src/resources/MipmapGenerator.cpp.o - -src/resources/MipmapGenerator.i: src/resources/MipmapGenerator.cpp.i -.PHONY : src/resources/MipmapGenerator.i - -# target to preprocess a source file -src/resources/MipmapGenerator.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/MipmapGenerator.cpp.i -.PHONY : src/resources/MipmapGenerator.cpp.i - -src/resources/MipmapGenerator.s: src/resources/MipmapGenerator.cpp.s -.PHONY : src/resources/MipmapGenerator.s - -# target to generate assembly for a file -src/resources/MipmapGenerator.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/resources/MipmapGenerator.cpp.s -.PHONY : src/resources/MipmapGenerator.cpp.s - -src/shaders/GlslShaderBuilder.o: src/shaders/GlslShaderBuilder.cpp.o -.PHONY : src/shaders/GlslShaderBuilder.o - -# target to build an object file -src/shaders/GlslShaderBuilder.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/GlslShaderBuilder.cpp.o -.PHONY : src/shaders/GlslShaderBuilder.cpp.o - -src/shaders/GlslShaderBuilder.i: src/shaders/GlslShaderBuilder.cpp.i -.PHONY : src/shaders/GlslShaderBuilder.i - -# target to preprocess a source file -src/shaders/GlslShaderBuilder.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/GlslShaderBuilder.cpp.i -.PHONY : src/shaders/GlslShaderBuilder.cpp.i - -src/shaders/GlslShaderBuilder.s: src/shaders/GlslShaderBuilder.cpp.s -.PHONY : src/shaders/GlslShaderBuilder.s - -# target to generate assembly for a file -src/shaders/GlslShaderBuilder.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/GlslShaderBuilder.cpp.s -.PHONY : src/shaders/GlslShaderBuilder.cpp.s - -src/shaders/Pipeline.o: src/shaders/Pipeline.cpp.o -.PHONY : src/shaders/Pipeline.o - -# target to build an object file -src/shaders/Pipeline.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/Pipeline.cpp.o -.PHONY : src/shaders/Pipeline.cpp.o - -src/shaders/Pipeline.i: src/shaders/Pipeline.cpp.i -.PHONY : src/shaders/Pipeline.i - -# target to preprocess a source file -src/shaders/Pipeline.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/Pipeline.cpp.i -.PHONY : src/shaders/Pipeline.cpp.i - -src/shaders/Pipeline.s: src/shaders/Pipeline.cpp.s -.PHONY : src/shaders/Pipeline.s - -# target to generate assembly for a file -src/shaders/Pipeline.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/Pipeline.cpp.s -.PHONY : src/shaders/Pipeline.cpp.s - -src/shaders/PipelineBuilder.o: src/shaders/PipelineBuilder.cpp.o -.PHONY : src/shaders/PipelineBuilder.o - -# target to build an object file -src/shaders/PipelineBuilder.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/PipelineBuilder.cpp.o -.PHONY : src/shaders/PipelineBuilder.cpp.o - -src/shaders/PipelineBuilder.i: src/shaders/PipelineBuilder.cpp.i -.PHONY : src/shaders/PipelineBuilder.i - -# target to preprocess a source file -src/shaders/PipelineBuilder.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/PipelineBuilder.cpp.i -.PHONY : src/shaders/PipelineBuilder.cpp.i - -src/shaders/PipelineBuilder.s: src/shaders/PipelineBuilder.cpp.s -.PHONY : src/shaders/PipelineBuilder.s - -# target to generate assembly for a file -src/shaders/PipelineBuilder.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/PipelineBuilder.cpp.s -.PHONY : src/shaders/PipelineBuilder.cpp.s - -src/shaders/SpirvShaderBuilder.o: src/shaders/SpirvShaderBuilder.cpp.o -.PHONY : src/shaders/SpirvShaderBuilder.o - -# target to build an object file -src/shaders/SpirvShaderBuilder.cpp.o: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/SpirvShaderBuilder.cpp.o -.PHONY : src/shaders/SpirvShaderBuilder.cpp.o - -src/shaders/SpirvShaderBuilder.i: src/shaders/SpirvShaderBuilder.cpp.i -.PHONY : src/shaders/SpirvShaderBuilder.i - -# target to preprocess a source file -src/shaders/SpirvShaderBuilder.cpp.i: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/SpirvShaderBuilder.cpp.i -.PHONY : src/shaders/SpirvShaderBuilder.cpp.i - -src/shaders/SpirvShaderBuilder.s: src/shaders/SpirvShaderBuilder.cpp.s -.PHONY : src/shaders/SpirvShaderBuilder.s - -# target to generate assembly for a file -src/shaders/SpirvShaderBuilder.cpp.s: - cd /home/martin/projects/mmo && $(MAKE) $(MAKESILENT) -f external/loft/modules/base/CMakeFiles/loft_base.dir/build.make external/loft/modules/base/CMakeFiles/loft_base.dir/src/shaders/SpirvShaderBuilder.cpp.s -.PHONY : src/shaders/SpirvShaderBuilder.cpp.s - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... rebuild_cache" - @echo "... loft_base" - @echo "... src/FramebufferBuilder.o" - @echo "... src/FramebufferBuilder.i" - @echo "... src/FramebufferBuilder.s" - @echo "... src/Gpu.o" - @echo "... src/Gpu.i" - @echo "... src/Gpu.s" - @echo "... src/Instance.o" - @echo "... src/Instance.i" - @echo "... src/Instance.s" - @echo "... src/io/file.o" - @echo "... src/io/file.i" - @echo "... src/io/file.s" - @echo "... src/resources/Buffer.o" - @echo "... src/resources/Buffer.i" - @echo "... src/resources/Buffer.s" - @echo "... src/resources/BufferBusWriter.o" - @echo "... src/resources/BufferBusWriter.i" - @echo "... src/resources/BufferBusWriter.s" - @echo "... src/resources/DefaultAllocator.o" - @echo "... src/resources/DefaultAllocator.i" - @echo "... src/resources/DefaultAllocator.s" - @echo "... src/resources/Image.o" - @echo "... src/resources/Image.i" - @echo "... src/resources/Image.s" - @echo "... src/resources/ImageBusWriter.o" - @echo "... src/resources/ImageBusWriter.i" - @echo "... src/resources/ImageBusWriter.s" - @echo "... src/resources/ImageView.o" - @echo "... src/resources/ImageView.i" - @echo "... src/resources/ImageView.s" - @echo "... src/resources/MipmapGenerator.o" - @echo "... src/resources/MipmapGenerator.i" - @echo "... src/resources/MipmapGenerator.s" - @echo "... src/shaders/GlslShaderBuilder.o" - @echo "... src/shaders/GlslShaderBuilder.i" - @echo "... src/shaders/GlslShaderBuilder.s" - @echo "... src/shaders/Pipeline.o" - @echo "... src/shaders/Pipeline.i" - @echo "... src/shaders/Pipeline.s" - @echo "... src/shaders/PipelineBuilder.o" - @echo "... src/shaders/PipelineBuilder.i" - @echo "... src/shaders/PipelineBuilder.s" - @echo "... src/shaders/SpirvShaderBuilder.o" - @echo "... src/shaders/SpirvShaderBuilder.i" - @echo "... src/shaders/SpirvShaderBuilder.s" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - cd /home/martin/projects/mmo && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/external/loft/modules/render_graph/tests/CMakeLists.txt b/external/loft/modules/render_graph/tests/CMakeLists.txt index c151652..7363d61 100644 --- a/external/loft/modules/render_graph/tests/CMakeLists.txt +++ b/external/loft/modules/render_graph/tests/CMakeLists.txt @@ -9,7 +9,6 @@ set(LIBS loft_base loft_common loft_window - ${SDL2_LIBRARIES} volk) set(FILES diff --git a/external/loft/modules/window/CMakeLists.txt b/external/loft/modules/window/CMakeLists.txt index dedd87e..8290e98 100644 --- a/external/loft/modules/window/CMakeLists.txt +++ b/external/loft/modules/window/CMakeLists.txt @@ -4,7 +4,7 @@ file(GLOB FILES src/*.c src/*.cpp) add_library(${PROJECT_NAME} ${FILES}) -find_package(SDL2 REQUIRED) +find_package(SDL3 REQUIRED) set_target_properties(${PROJECT_NAME} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PROJECT_SOURCE_DIR}/include/" @@ -13,7 +13,8 @@ set_target_properties(${PROJECT_NAME} PROPERTIES target_link_libraries(${PROJECT_NAME} PUBLIC loft_base - ${SDL2_LIBRARIES} + sdl::sdl + ${LIBDECOR_LIB} ) target_include_directories(${PROJECT_NAME} diff --git a/external/loft/modules/window/include/SDLWindow.h b/external/loft/modules/window/include/SDLWindow.h index 5897a2f..50a4f2b 100644 --- a/external/loft/modules/window/include/SDLWindow.h +++ b/external/loft/modules/window/include/SDLWindow.h @@ -6,7 +6,7 @@ #define LOFT_SDLWINDOW_H #include "Window.hpp" -#include +#include #include #include #include diff --git a/external/loft/modules/window/include/Window.hpp b/external/loft/modules/window/include/Window.hpp index db3e4f4..4faba7e 100644 --- a/external/loft/modules/window/include/Window.hpp +++ b/external/loft/modules/window/include/Window.hpp @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include diff --git a/external/loft/modules/window/src/SDLWindow.cpp b/external/loft/modules/window/src/SDLWindow.cpp index 8819679..0adae5c 100644 --- a/external/loft/modules/window/src/SDLWindow.cpp +++ b/external/loft/modules/window/src/SDLWindow.cpp @@ -1,10 +1,12 @@ -#include -#include +#include "SDLWindow.h" + +#include +#include #include #include -#include "SDLWindow.h" + #include "LoftException.hpp" -#include +#include #include #include @@ -27,16 +29,16 @@ VkExtent2D SDLWindow::get_size() const { SDLWindow::SDLWindow(std::string name, VkRect2D rect) : m_extent{rect.extent} { - if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVERYTHING) < 0) { + if(!SDL_Init(SDL_INIT_VIDEO)) { throw std::runtime_error("Failed to initialize sdl"); } m_pWindow = SDL_CreateWindow(name.c_str(), - SDL_WINDOWPOS_CENTERED, - SDL_WINDOWPOS_CENTERED, + // SDL_WINDOWPOS_CENTERED, + // SDL_WINDOWPOS_CENTERED, rect.extent.width, rect.extent.height, - SDL_WINDOW_VULKAN | SDL_WINDOW_ALLOW_HIGHDPI | + SDL_WINDOW_VULKAN | SDL_WINDOW_HIGH_PIXEL_DENSITY | SDL_WINDOW_RESIZABLE); if(m_pWindow == nullptr) { @@ -46,7 +48,7 @@ m_extent{rect.extent} Surface SDLWindow::create_surface(const Instance* instance) const { VkSurfaceKHR surface = VK_NULL_HANDLE; - SDL_Vulkan_CreateSurface(m_pWindow, instance->instance(), &surface); + SDL_Vulkan_CreateSurface(m_pWindow, instance->instance(), NULL, &surface); return Surface(instance, surface); } @@ -60,19 +62,21 @@ int32_t SDLWindow::poll_event(SDL_Event *pOutEvent) const { std::vector SDLWindow::get_required_extensions() const { uint32_t count = 0; - SDL_Vulkan_GetInstanceExtensions(m_pWindow, &count, nullptr); + const char* const *instance_extensions = SDL_Vulkan_GetInstanceExtensions(&count); - std::vector extensions(count); - SDL_Vulkan_GetInstanceExtensions(m_pWindow, &count, extensions.data()); + std::vector extensions(count); + for(int i = 0; i < count; i++) { + extensions[i] = std::string(instance_extensions[i]); + } - std::vector extension_strings(count); - std::transform(extensions.begin(), extensions.end(), - extension_strings.begin(), - [](const char* str) { - return std::string(str); - }); + // std::vector extension_strings(count); + // std::transform(extensions.begin(), extensions.end(), + // extension_strings.begin(), + // [](const char* str) { + // return std::string(str); + // }); - return extension_strings; + return extensions; } } diff --git a/modules/chat_service/chat_service/tests/chat_mock_client/ChatMockClient.cpp b/modules/chat_service/chat_service/tests/chat_mock_client/ChatMockClient.cpp index e90cdb2..9de9a5d 100644 --- a/modules/chat_service/chat_service/tests/chat_mock_client/ChatMockClient.cpp +++ b/modules/chat_service/chat_service/tests/chat_mock_client/ChatMockClient.cpp @@ -53,7 +53,7 @@ int main(int argc, char* argv[]) { } if (!channel_set) { - std::println(stderr, "Usage: {} [--host ] [--port ] --channel ", argv[0]); + // std::println(stderr, "Usage: {} [--host ] [--port ] --channel ", argv[0]); return 1; } @@ -87,7 +87,7 @@ int main(int argc, char* argv[]) { messages.set_handler( [](tw::msg::PeerId, const mmo::chat::ChatMessageBroadcastRequest& bcast) { - std::println("[ch:{}] <{}> {}", bcast.channel_id(), bcast.sender_id(), bcast.message()); + // std::println("[ch:{}] <{}> {}", bcast.channel_id(), bcast.sender_id(), bcast.message()); }); mmo::chat::JoinChannelRequest join; @@ -98,10 +98,10 @@ int main(int argc, char* argv[]) { [channel_id](std::span data) { mmo::chat::JoinChannelResponse resp; resp.ParseFromArray(data.data(), static_cast(data.size())); - std::println("Joined channel {} successfully.", channel_id); + // std::println("Joined channel {} successfully.", channel_id); }); - std::println("Joined channel {}. Type a message and press Enter. Ctrl+C to quit.", channel_id); + // std::println("Joined channel {}. Type a message and press Enter. Ctrl+C to quit.", channel_id); while (!g_quit.load()) { fd_set fds; @@ -121,7 +121,7 @@ int main(int argc, char* argv[]) { [channel_id](std::span data) { mmo::chat::SendChatMessageResponse resp; resp.ParseFromArray(data.data(), static_cast(data.size())); - std::println("Message sent to channel {}.", channel_id); + // std::println("Message sent to channel {}.", channel_id); }); } } diff --git a/modules/client/CMakeLists.txt b/modules/client/CMakeLists.txt index 1e6e08d..8bfa7b5 100644 --- a/modules/client/CMakeLists.txt +++ b/modules/client/CMakeLists.txt @@ -27,6 +27,7 @@ target_link_libraries(${PROJECT_NAME} tw::quicr loft::common loft::base + ${LIBDECOR_LIB} loft_window loft::render_graph tw::protocol diff --git a/src/io/InputState.hpp b/modules/client/src/io/InputState.hpp similarity index 74% rename from src/io/InputState.hpp rename to modules/client/src/io/InputState.hpp index c3b7c39..008fea1 100644 --- a/src/io/InputState.hpp +++ b/modules/client/src/io/InputState.hpp @@ -1,8 +1,8 @@ #pragma once -#include -#include -#include +#include +#include +#include #include @@ -69,30 +69,30 @@ public: m_motion_y = 0.0f; while(m_window->poll_event(&event)) { - ImGui_ImplSDL2_ProcessEvent(&event); + ImGui_ImplSDL3_ProcessEvent(&event); switch(event.type) { - case SDL_QUIT: + case SDL_EVENT_QUIT: m_is_quit = true; break; - case SDL_KEYDOWN: - case SDL_KEYUP: { - switch(event.key.keysym.sym) { - case SDLK_w: - m_is_pressed[0] = event.key.state; + case SDL_EVENT_KEY_DOWN: + case SDL_EVENT_KEY_UP: { + switch(event.key.key) { + case SDLK_W: + m_is_pressed[0] = event.key.down; break; - case SDLK_s: - m_is_pressed[1] = event.key.state; + case SDLK_S: + m_is_pressed[1] = event.key.down; break; - case SDLK_a: - m_is_pressed[2] = event.key.state; + case SDLK_A: + m_is_pressed[2] = event.key.down; break; - case SDLK_d: - m_is_pressed[3] = event.key.state; + case SDLK_D: + m_is_pressed[3] = event.key.down; break; } } break; - case SDL_MOUSEMOTION: + case SDL_EVENT_MOUSE_MOTION: m_motion_x = event.motion.xrel; m_motion_y = event.motion.yrel; break; diff --git a/modules/client/src/runtime.cpp b/modules/client/src/runtime.cpp index 25bb549..0ce4f4c 100644 --- a/modules/client/src/runtime.cpp +++ b/modules/client/src/runtime.cpp @@ -10,7 +10,7 @@ #include "imgui.h" #include "imgui_impl_vulkan.h" -#include "imgui_impl_sdl2.h" +#include "imgui_impl_sdl3.h" #include "implot.h" #include "implot_internal.h" @@ -18,7 +18,6 @@ #include "spdlog/spdlog.h" -#include #include #include #include @@ -105,7 +104,7 @@ void Runtime::run() { } ImGui_ImplVulkan_NewFrame(); - ImGui_ImplSDL2_NewFrame(); + ImGui_ImplSDL3_NewFrame(); ImGui::NewFrame(); m_input_manager.update(); diff --git a/modules/gui/src/ImGuiRenderPass.cpp b/modules/gui/src/ImGuiRenderPass.cpp index aac0c3f..9c274bc 100644 --- a/modules/gui/src/ImGuiRenderPass.cpp +++ b/modules/gui/src/ImGuiRenderPass.cpp @@ -6,7 +6,7 @@ #include "imgui.h" #include "backends/imgui_impl_vulkan.h" -#include "backends/imgui_impl_sdl2.h" +#include "backends/imgui_impl_sdl3.h" namespace tw::drw::gui { @@ -73,7 +73,7 @@ lft::rg::RenderTaskBuilder ImGuiRenderPass::create_render_task() { const std::string font_path = "/home/martin/projects/mmo/external/imgui/misc/fonts/ProggyClean.ttf"; io.Fonts->AddFontFromFileTTF(font_path.c_str(), 13.0f); auto init_info = create_imgui_init_info(info.gpu(), info.renderpass()); - ImGui_ImplSDL2_InitForVulkan(context->m_window->get_handle()); + ImGui_ImplSDL3_InitForVulkan(context->m_window->get_handle()); ImGui_ImplVulkan_Init(&init_info); context->is_initialized = true; diff --git a/modules/server/CMakeLists.txt b/modules/server/CMakeLists.txt index 3f03ddd..2596805 100644 --- a/modules/server/CMakeLists.txt +++ b/modules/server/CMakeLists.txt @@ -35,6 +35,7 @@ target_link_libraries(tw_server_lib Jolt protobuf::libprotobuf ${Boost_LIBRARIES} + ${LIBDECOR_LIB} Tracy::TracyClient pqxx pq