Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
03b5aa8
new working branch
Leeer0y Aug 11, 2026
03d3276
Squashed 'vendor/SDL/' content from commit 767459e4c
Leeer0y Aug 11, 2026
e4a1513
Merge commit '03d327648dcc540e368986461f2ab9a3c3d93279' as 'vendor/SDL'
Leeer0y Aug 11, 2026
5513303
Squashed 'vendor/fastgltf/' content from commit a31be255f
Leeer0y Aug 11, 2026
96682d7
Merge commit '5513303d4838d0986cb1008c83036bc3a11b68da' as 'vendor/fa…
Leeer0y Aug 11, 2026
8a547ef
Squashed 'vendor/fmt/' content from commit 6c285ba88
Leeer0y Aug 11, 2026
69f23fe
Merge commit '8a547ef1c774009ceb39fea5ae7b712bbed01228' as 'vendor/fmt'
Leeer0y Aug 11, 2026
d07eb4d
Squashed 'vendor/glm/' content from commit 6f14f4792a
Leeer0y Aug 11, 2026
9d3154e
Merge commit 'd07eb4d9391c58e72accfe868333509048ec131c' as 'vendor/glm'
Leeer0y Aug 11, 2026
b2c2803
Squashed 'vendor/imgui/' content from commit 46d39d56fe
Leeer0y Aug 11, 2026
35cc426
Merge commit 'b2c2803500430684d56b86fa0dd7000a02f34a34' as 'vendor/im…
Leeer0y Aug 11, 2026
c989d33
Squashed 'vendor/stb/' content from commit 2c980bb598
Leeer0y Aug 11, 2026
113546e
Merge commit 'c989d3396bf499e537b0ec149dcc2e79bdb909fd' as 'vendor/stb'
Leeer0y Aug 11, 2026
bac3371
Squashed 'vendor/vkbootstrap/' content from commit 05df460864
Leeer0y Aug 11, 2026
6903bca
Merge commit 'bac3371f3149728bb2124d982bcd926b530472d4' as 'vendor/vk…
Leeer0y Aug 11, 2026
7485029
Squashed 'vendor/vma/' content from commit 3aa921224c
Leeer0y Aug 11, 2026
fc33615
Merge commit '74850291fb93a1ea36ddccb8b0052f01a55b5afc' as 'vendor/vma'
Leeer0y Aug 11, 2026
86e6307
Squashed 'vendor/volk/' content from commit dbc6d2fbb0
Leeer0y Aug 11, 2026
453b158
Merge commit '86e630754901bceb6d7f0c9ad2f1d82be29ad94b' as 'vendor/volk'
Leeer0y Aug 11, 2026
cf180de
Updated starting point to support modern versions of librarys. Change…
Leeer0y Aug 11, 2026
0de7041
made a few comments
Leeer0y Aug 11, 2026
60dedc2
added readme
Leeer0y Aug 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# CMakeList.txt : CMake project for vulkan_guide, include source and define
# project specific logic here.
#
cmake_minimum_required (VERSION 3.8)
cmake_minimum_required (VERSION 3.11)

project ("vulkan_guide")


find_package(Vulkan REQUIRED)

add_subdirectory(third_party)
add_subdirectory(vendor)

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin")
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin")
Expand All @@ -18,8 +18,6 @@ add_subdirectory(src)
find_program(GLSL_VALIDATOR glslangValidator HINTS /usr/bin /usr/local/bin $ENV{VULKAN_SDK}/Bin/ $ENV{VULKAN_SDK}/Bin32/)




file(GLOB_RECURSE GLSL_SOURCE_FILES
"${PROJECT_SOURCE_DIR}/shaders/*.frag"
"${PROJECT_SOURCE_DIR}/shaders/*.vert"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated libraries and respective CMakeLists.txt to their modern versions, vendoring them using git subtree. Major library change includes the use of SDL3 rather than SDL2, this will create some differences when following the tutorial. It's recommended to reference the [SDL3 Wiki](https://wiki.libsdl.org/SDL3/FrontPage).
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ set_property(TARGET engine PROPERTY CXX_STANDARD 20)
target_compile_definitions(engine PUBLIC GLM_FORCE_DEPTH_ZERO_TO_ONE)
target_include_directories(engine PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")

target_link_libraries(engine PUBLIC vma glm Vulkan::Vulkan fmt::fmt stb_image SDL2::SDL2 vkbootstrap imgui fastgltf::fastgltf)
target_link_libraries(engine PRIVATE vk-bootstrap::vk-bootstrap ${CMAKE_DL_LIBS}) # Required for vk-bootstrap to properly link to dynamic libraries on linux.
target_link_libraries(engine PUBLIC glm Vulkan::Vulkan GPUOpen::VulkanMemoryAllocator fmt::fmt stb SDL3::SDL3 imgui fastgltf::fastgltf)

target_precompile_headers(engine PUBLIC <optional> <vector> <memory> <string> <vector> <unordered_map> <glm/mat4x4.hpp> <glm/vec4.hpp> <vulkan/vulkan.h>)

Expand Down
21 changes: 9 additions & 12 deletions src/vk_engine.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//> includes
#include "vk_engine.h"
#include "SDL3/SDL_events.h"

#include <SDL.h>
#include <SDL_vulkan.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_vulkan.h>

#include <vk_initializers.h>
#include <vk_types.h>
Expand All @@ -26,8 +27,6 @@ void VulkanEngine::init()

_window = SDL_CreateWindow(
"Vulkan Engine",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
_windowExtent.width,
_windowExtent.height,
window_flags);
Expand Down Expand Up @@ -62,16 +61,14 @@ void VulkanEngine::run()
// Handle events on queue
while (SDL_PollEvent(&e) != 0) {
// close the window when user alt-f4s or clicks the X button
if (e.type == SDL_QUIT)
if (e.type == SDL_EVENT_QUIT)
bQuit = true;

if (e.type == SDL_WINDOWEVENT) {
if (e.window.event == SDL_WINDOWEVENT_MINIMIZED) {
stop_rendering = true;
}
if (e.window.event == SDL_WINDOWEVENT_RESTORED) {
stop_rendering = false;
}
if (e.type == SDL_EVENT_WINDOW_MINIMIZED) {
stop_rendering = true;
}
if (e.type == SDL_EVENT_WINDOW_RESTORED) {
stop_rendering = false;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/vk_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <vulkan/vulkan.h>
#include <vulkan/vk_enum_string_helper.h>
#include <vk_mem_alloc.h>
#include <vma/vk_mem_alloc.h>

#include <fmt/core.h>

Expand Down
52 changes: 0 additions & 52 deletions third_party/CMakeLists.txt

This file was deleted.

90 changes: 0 additions & 90 deletions third_party/SDL/.clang-format

This file was deleted.

79 changes: 0 additions & 79 deletions third_party/SDL/.editorconfig

This file was deleted.

7 changes: 0 additions & 7 deletions third_party/SDL/.github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

Loading