From 62dee3b2bbe19a6e451fed64ed7a8e2ee11f5c3f Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sun, 28 Sep 2025 18:16:59 +0200 Subject: [PATCH] =?UTF-8?q?Ajustar=20proporciones:=20ventana=2050%=20m?= =?UTF-8?q?=C3=A1s=20grande=20y=20sprite=20proporcional?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cambios realizados: - Ventana: 640x480 → 960x720 pixels (+50% tamaño) - Sprite: 64px → 30px (mantiene proporción original de 10px en 320x240) - Proporción matemática: 3.125% ancho, 4.167% alto (igual que referencia) La pelota ahora se ve del tamaño correcto relativo a la ventana, manteniendo la misma proporción visual que en la versión 320x240. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- source/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/main.cpp b/source/main.cpp index 92a94ed..9107ef7 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -53,7 +53,7 @@ int main(int argc, char* argv[]) { } // Crear ventana - SDL_Window* window = SDL_CreateWindow("vibe5_metal - Triangle + Gradient + Sprites", 640, 480, SDL_WINDOW_HIGH_PIXEL_DENSITY); + SDL_Window* window = SDL_CreateWindow("vibe5_metal - Triangle + Gradient + Sprites", 960, 720, SDL_WINDOW_HIGH_PIXEL_DENSITY); if (!window) { std::cout << "SDL_CreateWindow failed: " << SDL_GetError() << std::endl; SDL_Quit(); @@ -481,10 +481,10 @@ fragment float4 sprite_fragment_main(SpriteVertexOut in [[stage_in]], // Crear sprite centrado con un tamaño pequeño SpriteVertex spriteVertices[6]; // 2 triángulos para formar un quad - // Sprite centrado de 64x64 pixels en pantalla de 640x480 - float spriteSize = 64.0f; - float windowWidth = 640.0f; - float windowHeight = 480.0f; + // Sprite centrado de 30x30 pixels en pantalla de 960x720 (mantiene proporción de 10px en 320x240) + float spriteSize = 30.0f; + float windowWidth = 960.0f; + float windowHeight = 720.0f; // Convertir a coordenadas NDC float halfWidth = (spriteSize / windowWidth); // 0.1 en NDC