Switched to GLFW

This commit is contained in:
Alexandre 2026-04-19 01:38:12 +02:00
parent 8cf07095dd
commit 102e4de093
11 changed files with 93 additions and 96 deletions

View File

@ -5,9 +5,10 @@ project(VulkanEngine)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Find all package dependencies # Find all package dependencies
find_package( glm REQUIRED ) # just one package as an exemple find_package( glfw3 REQUIRED )
find_package( glm REQUIRED )
find_package( VulkanMemoryAllocator CONFIG REQUIRED ) find_package( VulkanMemoryAllocator CONFIG REQUIRED )
find_package( sdl2 REQUIRED ) find_package( fmt REQUIRED )
# fastgltf because it's not in nixpkgs # fastgltf because it's not in nixpkgs
include(FetchContent) include(FetchContent)
@ -82,5 +83,5 @@ endfunction()
addBinary ( addBinary (
main main
LIBS SDL2::SDL2 LIBS glfw fmt
) )

Binary file not shown.

View File

@ -1,23 +1,12 @@
# ninja log v7 # ninja log v7
2 832 1776524224772581787 build.ninja 49485a7fb337b1e6 2 427 1776550681641674341 CMakeFiles/main.dir/src/main.cpp.o.ddi 2c0b378e41ca85e7
2 832 1776524224770019075 /home/alex/Developer/Code/Vulkan/bin/cmake_install.cmake 49485a7fb337b1e6 427 439 1776550682079111060 CMakeFiles/main.dir/CXX.dd 64625a41e7cb2d24
1 2544 1776523437569221238 _deps/fastgltf-build/CMakeFiles/fastgltf.dir/src/io.cpp.o 55102a173727ecf5 427 439 1776550682079111060 CMakeFiles/main.dir/CXXModules.json 64625a41e7cb2d24
0 2839 1776523437568925562 _deps/fastgltf-build/CMakeFiles/fastgltf.dir/src/base64.cpp.o 24783971ab3df401 427 439 1776550682079111060 CMakeFiles/main.dir/src/main.cpp.o.modmap 64625a41e7cb2d24
1 3179 1776523437569454443 _deps/fastgltf-build/CMakeFiles/fastgltf.dir/deps/simdjson/simdjson.cpp.o 81bd726d153d0dba 4 3253 1776550681644433449 _deps/fastgltf-build/CMakeFiles/fastgltf.dir/src/io.cpp.o 55102a173727ecf5
0 7845 1776523437568734172 _deps/fastgltf-build/CMakeFiles/fastgltf.dir/src/fastgltf.cpp.o 808ecdb040f91506 3 3477 1776550681643892334 _deps/fastgltf-build/CMakeFiles/fastgltf.dir/src/base64.cpp.o 24783971ab3df401
2 832 1776524224772581787 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-build/cmake_install.cmake 49485a7fb337b1e6 440 3482 1776550682079675167 CMakeFiles/main.dir/src/main.cpp.o a3ec966cb9dd3537
2 234 1776523743038837711 _deps/fastgltf-build/libfastgltf.a 35ed20c53ec12f4b 3482 3662 1776550685121680911 main/main c71c2a00f8b47f97
3 443 1776523899323132202 CMakeFiles/main.dir/src/main.cpp.o.ddi 2c0b378e41ca85e7 5 3711 1776550681644674346 _deps/fastgltf-build/CMakeFiles/fastgltf.dir/deps/simdjson/simdjson.cpp.o 81bd726d153d0dba
3 14 1776523941796235970 CMakeFiles/main.dir/CXX.dd 64625a41e7cb2d24 3 7925 1776550681642674342 _deps/fastgltf-build/CMakeFiles/fastgltf.dir/src/fastgltf.cpp.o 808ecdb040f91506
3 14 1776523941796235970 CMakeFiles/main.dir/CXXModules.json 64625a41e7cb2d24 7925 8045 1776550689564689298 _deps/fastgltf-build/libfastgltf.a 35ed20c53ec12f4b
3 14 1776523941796235970 CMakeFiles/main.dir/src/main.cpp.o.modmap 64625a41e7cb2d24
452 2309 1776523899772136336 CMakeFiles/main.dir/src/main.cpp.o a3ec966cb9dd3537
4 803 1776524224772581787 build.ninja 49485a7fb337b1e6
4 803 1776524224772581787 /home/alex/Developer/Code/Vulkan/bin/cmake_install.cmake 49485a7fb337b1e6
4 803 1776524224772581787 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-build/cmake_install.cmake 49485a7fb337b1e6
2 481 1776524224779019102 CMakeFiles/main.dir/src/main.cpp.o.ddi ad45a11344eefd19
481 491 1776524225259020540 CMakeFiles/main.dir/CXX.dd 64625a41e7cb2d24
481 491 1776524225259020540 CMakeFiles/main.dir/CXXModules.json 64625a41e7cb2d24
481 491 1776524225259020540 CMakeFiles/main.dir/src/main.cpp.o.modmap 64625a41e7cb2d24
491 2388 1776524225268140989 CMakeFiles/main.dir/src/main.cpp.o b37edae0e954e5dc
2388 2579 1776524227165026252 main/main 5d4e64b1fe423d3a

View File

@ -1,37 +1,21 @@
# ninja log v7 # ninja log v7
1 16 1776523434263396135 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-mkdir e7b554f212059804 0 15 1776550664112641249 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-mkdir e7b554f212059804
1 16 1776523434263396135 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-mkdir e7b554f212059804 0 15 1776550664112641249 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-mkdir e7b554f212059804
16 1402 1776523435649396820 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-download d6b057c3f4523864 15 1596 1776550665693644234 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-download d6b057c3f4523864
16 1402 1776523435649396820 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-download d6b057c3f4523864 15 1596 1776550665693644234 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-download d6b057c3f4523864
0 15 1776523941056234125 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-update 18ab84be450bf721 1596 1615 1776550665694644236 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-update 18ab84be450bf721
0 15 1776523941056234125 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-update 18ab84be450bf721 1596 1615 1776550665694644236 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-update 18ab84be450bf721
15 30 1776523941085234197 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-patch 4ddfc104a209a355 1615 1633 1776550665730644304 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-patch 4ddfc104a209a355
15 30 1776523941085234197 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-patch 4ddfc104a209a355 1615 1633 1776550665730644304 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-patch 4ddfc104a209a355
30 44 1776523941100234235 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-configure f003ba6b94beeb51 1633 1652 1776550665749644340 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-configure f003ba6b94beeb51
30 44 1776523941100234235 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-configure f003ba6b94beeb51 1633 1652 1776550665749644340 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-configure f003ba6b94beeb51
45 58 1776523941114234269 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-build 94eddf46f8205f82 1652 1670 1776550665767644374 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-build 94eddf46f8205f82
45 58 1776523941114234269 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-build 94eddf46f8205f82 1652 1670 1776550665767644374 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-build 94eddf46f8205f82
59 72 1776523941128234304 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-install 8ab81e46393e391c 1670 1688 1776550665786644410 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-install 8ab81e46393e391c
59 72 1776523941128234304 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-install 8ab81e46393e391c 1670 1688 1776550665786644410 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-install 8ab81e46393e391c
72 87 1776523941142234339 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-test 985ab92c32343512 1688 1707 1776550665804644443 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-test 985ab92c32343512
72 87 1776523941142234339 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-test 985ab92c32343512 1688 1707 1776550665804644443 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-test 985ab92c32343512
87 107 1776523941162234389 CMakeFiles/fastgltf-populate-complete 4f7c559732830105 1707 1733 1776550665831644495 CMakeFiles/fastgltf-populate-complete 4f7c559732830105
87 107 1776523941162234389 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-done 4f7c559732830105 1707 1733 1776550665831644495 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-done 4f7c559732830105
87 107 1776523941162234389 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/CMakeFiles/fastgltf-populate-complete 4f7c559732830105 1707 1733 1776550665831644495 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/CMakeFiles/fastgltf-populate-complete 4f7c559732830105
87 107 1776523941162234389 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-done 4f7c559732830105 1707 1733 1776550665831644495 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-done 4f7c559732830105
0 16 1776524224080017009 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-update 18ab84be450bf721
0 16 1776524224080017009 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-update 18ab84be450bf721
16 30 1776524224109017096 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-patch 4ddfc104a209a355
16 30 1776524224109017096 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-patch 4ddfc104a209a355
30 44 1776524224124017141 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-configure f003ba6b94beeb51
30 44 1776524224124017141 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-configure f003ba6b94beeb51
44 58 1776524224138017182 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-build 94eddf46f8205f82
44 58 1776524224138017182 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-build 94eddf46f8205f82
58 72 1776524224151017221 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-install 8ab81e46393e391c
58 72 1776524224151017221 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-install 8ab81e46393e391c
72 86 1776524224166017266 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-test 985ab92c32343512
72 86 1776524224166017266 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-test 985ab92c32343512
86 106 1776524224186017326 CMakeFiles/fastgltf-populate-complete 4f7c559732830105
86 106 1776524224186017326 fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-done 4f7c559732830105
86 106 1776524224186017326 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/CMakeFiles/fastgltf-populate-complete 4f7c559732830105
86 106 1776524224186017326 /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/fastgltf-populate-prefix/src/fastgltf-populate-stamp/fastgltf-populate-done 4f7c559732830105

View File

@ -180,14 +180,14 @@ build all: phony fastgltf-populate
############################################# #############################################
# Re-run CMake if any of its inputs changed. # Re-run CMake if any of its inputs changed.
build build.ninja /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/cmake_install.cmake: RERUN_CMAKE | /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeGenericSystem.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeInitializeConfigs.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeSystemSpecificInformation.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeSystemSpecificInitialize.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/PatchInfo.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/RepositoryInfo.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/UpdateInfo.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/cfgcmd.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/gitclone.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/gitupdate.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/mkdirs.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/shared_internal_commands.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/Platform/Linux-Initialize.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/Platform/Linux.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/Platform/UnixPaths.cmake CMakeCache.txt CMakeFiles/4.1.2/CMakeSystem.cmake CMakeLists.txt fastgltf-populate-prefix/tmp/fastgltf-populate-mkdirs.cmake build build.ninja /home/alex/Developer/Code/Vulkan/bin/_deps/fastgltf-subbuild/cmake_install.cmake: RERUN_CMAKE | /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeDetermineSystem.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeGenericSystem.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeInitializeConfigs.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeSystem.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeSystemSpecificInformation.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeSystemSpecificInitialize.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/PatchInfo.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/RepositoryInfo.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/UpdateInfo.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/cfgcmd.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/gitclone.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/gitupdate.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/mkdirs.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/shared_internal_commands.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/Platform/Linux-Initialize.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/Platform/Linux.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/Platform/UnixPaths.cmake CMakeCache.txt CMakeFiles/4.1.2/CMakeSystem.cmake CMakeLists.txt fastgltf-populate-prefix/tmp/fastgltf-populate-mkdirs.cmake
pool = console pool = console
############################################# #############################################
# A missing CMake input file is not an error. # A missing CMake input file is not an error.
build /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeGenericSystem.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeInitializeConfigs.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeSystemSpecificInformation.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeSystemSpecificInitialize.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/PatchInfo.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/RepositoryInfo.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/UpdateInfo.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/cfgcmd.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/gitclone.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/gitupdate.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/mkdirs.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/shared_internal_commands.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/Platform/Linux-Initialize.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/Platform/Linux.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/Platform/UnixPaths.cmake CMakeCache.txt CMakeFiles/4.1.2/CMakeSystem.cmake CMakeLists.txt fastgltf-populate-prefix/tmp/fastgltf-populate-mkdirs.cmake: phony build /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeDetermineSystem.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeGenericSystem.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeInitializeConfigs.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeSystem.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeSystemSpecificInformation.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/CMakeSystemSpecificInitialize.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/PatchInfo.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/RepositoryInfo.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/UpdateInfo.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/cfgcmd.txt.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/gitclone.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/gitupdate.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/mkdirs.cmake.in /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/shared_internal_commands.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/Platform/Linux-Initialize.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/Platform/Linux.cmake /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/Platform/UnixPaths.cmake CMakeCache.txt CMakeFiles/4.1.2/CMakeSystem.cmake CMakeLists.txt fastgltf-populate-prefix/tmp/fastgltf-populate-mkdirs.cmake: phony
############################################# #############################################

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
[ [
{ {
"directory": "/home/alex/Developer/Code/Vulkan/bin", "directory": "/home/alex/Developer/Code/Vulkan/bin",
"command": "/nix/store/a245z3cvf9x9sn0xlk6k8j9xhxbhda1z-gcc-wrapper-15.2.0/bin/g++ -DVULKAN_HPP_HANDLE_ERROR_OUT_OF_DATE_AS_SUCCESS -isystem /nix/store/55g2yvciw0whi44h5614q58lfv8akh5d-sdl2-compat-2.32.62-dev/include -isystem /nix/store/55g2yvciw0whi44h5614q58lfv8akh5d-sdl2-compat-2.32.62-dev/include/SDL2 -g -std=gnu++20 -fmodules-ts -fmodule-mapper=CMakeFiles/main.dir/src/main.cpp.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o CMakeFiles/main.dir/src/main.cpp.o -c /home/alex/Developer/Code/Vulkan/src/main.cpp", "command": "/nix/store/a245z3cvf9x9sn0xlk6k8j9xhxbhda1z-gcc-wrapper-15.2.0/bin/g++ -DVULKAN_HPP_HANDLE_ERROR_OUT_OF_DATE_AS_SUCCESS -g -std=gnu++20 -fmodules-ts -fmodule-mapper=CMakeFiles/main.dir/src/main.cpp.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o CMakeFiles/main.dir/src/main.cpp.o -c /home/alex/Developer/Code/Vulkan/src/main.cpp",
"file": "/home/alex/Developer/Code/Vulkan/src/main.cpp", "file": "/home/alex/Developer/Code/Vulkan/src/main.cpp",
"output": "/home/alex/Developer/Code/Vulkan/bin/CMakeFiles/main.dir/src/main.cpp.o" "output": "/home/alex/Developer/Code/Vulkan/bin/CMakeFiles/main.dir/src/main.cpp.o"
}, },

Binary file not shown.

View File

@ -2,10 +2,6 @@
// Normal header // Normal header
#include "types.h" #include "types.h"
#include <vulkan/vulkan_core.h>
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
class Engine { class Engine {
public: public:
@ -13,7 +9,7 @@ class Engine {
int _frameNumber { 0 }; int _frameNumber { 0 };
VkExtent2D _windowExtent { 1700, 900 }; VkExtent2D _windowExtent { 1700, 900 };
struct SDL_Window* _window { nullptr }; GLFWwindow *window { nullptr };
void init(); void init();
@ -26,13 +22,14 @@ class Engine {
#ifdef ENGINE_IMPL #ifdef ENGINE_IMPL
// Implementation // Implementation
// Change this to use GLFW later
#include "initializers.h" #include "initializers.h"
#define CALLBACK_IMPL
#include "callbacks.h"
void Engine::init() { void Engine::init() {
#ifndef NDEBUG #ifndef NDEBUG
fmt::println("Initializing the engine...") fmt::println("Initializing the engine...");
#endif #endif
glfwInit(); glfwInit();
@ -41,23 +38,26 @@ void Engine::init() {
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
window = glfwCreateWindow( window = glfwCreateWindow(
static_cast<uint32_t>(windowExtent.width), static_cast<uint32_t>(_windowExtent.width),
static_cast<uint32_t>(windowExtent.height), static_cast<uint32_t>(_windowExtent.height),
"Engine", "Engine",
nullptr, nullptr,
nullptr nullptr
); );
glfwSetKeyCallback(window, Callback::keyboardCallback);
_isInitialized = true; _isInitialized = true;
#ifndef NDEBUG #ifndef NDEBUG
fmt::println("Engine Initialized !") fmt::println("Engine Initialized !");
#endif #endif
} }
void Engine::cleanup() { void Engine::cleanup() {
if (_isInitialized) { if (_isInitialized) {
SDL_DestroyWindow(_window); glfwDestroyWindow(window);
glfwTerminate();
} }
} }
@ -66,21 +66,25 @@ void Engine::draw() {
} }
void Engine::run() { void Engine::run() {
SDL_Event e; bool stopRendering = false;
bool bQuit = false;
while (!bQuit) { while (!glfwWindowShouldClose(window)) {
while ( SDL_PollEvent(&e) != 0 ) { glfwPollEvents();
if ( e.type == SDL_QUIT ) {
bQuit = true;
}
if (!GLFW_VISIBLE) { if (glfwGetWindowAttrib(window, GLFW_ICONIFIED)) {
// Window is not visible (minimized or somehting else), throttle render stopRendering = true;
} } else {
stopRendering = false;
draw();
} }
if (stopRendering) {
// Minimized, pause
std::this_thread::sleep_for(std::chrono::milliseconds(100));
continue;
}
draw();
} }
} }

View File

@ -8,16 +8,25 @@
#include <array> #include <array>
#include <functional> #include <functional>
#include <deque> #include <deque>
#include <chrono>
#include <thread>
#include <vulkan/vulkan.h> #include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>
#include <vulkan/vk_enum_string_helper.h> #include <vulkan/vk_enum_string_helper.h>
#include <vk_mem_alloc.h> #include <vk_mem_alloc.h>
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include <fmt/core.h> #include <fmt/core.h>
#include <glm/mat4x4.hpp> #include <glm/mat4x4.hpp>
#include <glm/vec4.hpp> #include <glm/vec4.hpp>
// Custom headers
//#include "callbacks.h"
#ifdef TYPES_IMPL #ifdef TYPES_IMPL
// Implementation // Implementation

View File

@ -6,6 +6,6 @@ int main(int argc, char* argv[]) {
Engine engine; Engine engine;
engine.init(); engine.init();
// Just works :)
return 0; return 0;
} }