Esquelet inicial: finestra negra i primera escena

This commit is contained in:
JailDesigner committed 2026-04-18 19:56:59 +02:00
1 parent 959a3871db
commit 7bb1edd08a
20 files changed
+818

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
#pragma once
#include <SDL3/SDL.h>
#include <cstdint>
class Screen {
public:
static void init();
static void destroy();
static auto get() -> Screen*;
void clear(std::uint8_t r = 0, std::uint8_t g = 0, std::uint8_t b = 0);
void present();
[[nodiscard]] auto getRenderer() const -> SDL_Renderer* { return renderer_; }
[[nodiscard]] auto getTarget() const -> SDL_Texture* { return game_texture_; }
private:
Screen();
~Screen();
static Screen* instance;
SDL_Window* window_{nullptr};
SDL_Renderer* renderer_{nullptr};
SDL_Texture* game_texture_{nullptr};
};