This commit is contained in:
2026-04-17 22:20:37 +02:00
parent 513eacf356
commit 20b9a95619
38 changed files with 310 additions and 622 deletions

View File

@@ -77,7 +77,8 @@ auto Screen::get() -> Screen * {
}
// Constructor
Screen::Screen(SDL_Window *window, SDL_Renderer *renderer) {
Screen::Screen(SDL_Window *window, SDL_Renderer *renderer)
: borderColor{0x00, 0x00, 0x00} {
// Inicializa variables
this->window = window;
this->renderer = renderer;
@@ -85,9 +86,6 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer) {
gameCanvasWidth = GAMECANVAS_WIDTH;
gameCanvasHeight = GAMECANVAS_HEIGHT;
// Define el color del borde para el modo de pantalla completa
borderColor = {0x00, 0x00, 0x00};
// Establece el modo de video (fullscreen/ventana + logical presentation)
// ANTES de crear la textura — SDL3 GPU necesita la logical presentation
// del renderer ya aplicada al swapchain quan es reclama la ventana per a GPU.