checkpoint

This commit is contained in:
2026-04-11 23:57:57 -05:00
parent 44a5e2cab9
commit b196c97cf0
7 changed files with 15 additions and 4 deletions

View File

@@ -16,6 +16,7 @@ void App::init() {
utils::debugPrint(__FUNCTION__, __LINE__, "Init app.", utils::DebugLevel::Trace);
window_ = new Window();
engine_ = new Engine(window_);
}
@@ -34,6 +35,11 @@ int App::run() {
quit = true;
}
}
// pass vulkan handling to engine
// call engine.render() or something
// engine has a pointer to window so can handle pushing to the screen
}
// SDL teardown handled in window destructor

View File

@@ -2,6 +2,7 @@
#pragma once
#include "Window.hpp"
#include "engine/Engine.hpp"
class App {
@@ -19,5 +20,6 @@ private:
void init();
Window* window_;
Engine* engine_;
};

View File

@@ -9,15 +9,15 @@ Window::Window() {
Window::~Window() {
SDL_DestroyWindow(window_);
SDL_DestroyWindow(sdlWindow_);
SDL_Quit();
}
int Window::init() {
window_ = SDL_CreateWindow("How to Vulkan", 1280u, 720u, SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE);
sdlWindow_ = SDL_CreateWindow("How to Vulkan", 1280u, 720u, SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE);
return (window_ == nullptr);
return (sdlWindow_ == nullptr);
}

View File

@@ -17,6 +17,6 @@ private:
int init();
SDL_Window* window_;
SDL_Window* sdlWindow_;
};