29 lines
600 B
C++
29 lines
600 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <SDL3/SDL.h>
|
|
#include <iostream>
|
|
|
|
#include <utils.hpp>
|
|
#include <renderer/renderer.hpp>
|
|
#include <thread>
|
|
#include <functional>
|
|
#include <chrono>
|
|
|
|
namespace Game::Window {
|
|
class Window {
|
|
public:
|
|
Window();
|
|
DISABLE_COPY_AND_MOVE(Window)
|
|
~Window();
|
|
|
|
bool init(int width, int height, const std::string& title);
|
|
void run();
|
|
|
|
private:
|
|
SDL_Window* mWindow;
|
|
Renderer::Renderer mRenderer;
|
|
std::jthread mRenderThread;
|
|
bool mRunning;
|
|
};
|
|
} |