From 9c9896458803aa3a7f780673729c3f8d7c0239d4 Mon Sep 17 00:00:00 2001 From: Blitblank Date: Sat, 11 Apr 2026 00:24:26 -0500 Subject: [PATCH] sigh moving to windows --- CMakeLists.txt | 8 ++++++++ README.md | 3 ++- scripts/install_dependencies.ps1 | 0 src/app/Window.cpp | 14 ++++++++++++++ src/app/Window.hpp | 6 ++++++ 5 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 scripts/install_dependencies.ps1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 24980e8..8b8b5d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,10 @@ set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}) #add_subdirectory(src) +set(SDL3_DIR "C:/Users/pmcge/Downloads/SDL3-devel-3.4.4-VC/SDL3-3.4.4") + +find_package(SDL3 REQUIRED) + # TODO: cascade cmakelists.txt add_executable(ouros src/main.cpp @@ -21,3 +25,7 @@ target_include_directories(ouros PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/" "${CMAKE_CURRENT_SOURCE_DIR}/src" ) + +target_link_libraries(ouros PRIVATE + SDL3::SDL3 +) diff --git a/README.md b/README.md index bade9ec..c85c1dc 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,9 @@ Below is beyond Sascha's guide, but available elsewhere on his github. These are ### Dependencies: - CMake > 3.2 - - C++20 + - C++20 compatible compiler (I use g++12 or MSVC++17) - Vulkan compatible gpu drivers (tested with an RTX3070 and an R9700) + - SDL3 - Will add more as the project grows ### Clone respository: diff --git a/scripts/install_dependencies.ps1 b/scripts/install_dependencies.ps1 new file mode 100644 index 0000000..e69de29 diff --git a/src/app/Window.cpp b/src/app/Window.cpp index e69de29..434ad03 100644 --- a/src/app/Window.cpp +++ b/src/app/Window.cpp @@ -0,0 +1,14 @@ + +#include "Window.hpp" + +Window::Window() { + + init(); + +} + +int Window::init() { + + window_ = SDL_CreateWindow("How to Vulkan", 1280u, 720u, SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE); + +} diff --git a/src/app/Window.hpp b/src/app/Window.hpp index 2c304a7..605d5a0 100644 --- a/src/app/Window.hpp +++ b/src/app/Window.hpp @@ -1,6 +1,9 @@ #pragma once +#include "SDL3/SDL.h" +#include "SDL3/SDL_Vulkan.h" + class Window { public: @@ -10,6 +13,9 @@ public: private: + int init(); + + SDL_Window* window_; }; \ No newline at end of file