Threading for renderer, textures, entities, game state

This commit is contained in:
2026-03-11 09:01:10 +01:00
parent 755e14ad62
commit d748ca63a0
12 changed files with 218 additions and 30 deletions

View File

@@ -1,11 +1,14 @@
#pragma once
#include <string>
#include <SDL2/SDL.h>
#include <SDL3/SDL.h>
#include <iostream>
#include <utils.hpp>
#include <renderer/renderer.hpp>
#include <thread>
#include <functional>
#include <chrono>
namespace Game::Window {
class Window {
@@ -18,8 +21,9 @@ namespace Game::Window {
void run();
private:
SDL_Window *mWindow;
SDL_Window* mWindow;
Renderer::Renderer mRenderer;
std::jthread mRenderThread;
bool mRunning;
};
}