mostra el render device en info_debug

This commit is contained in:
2026-03-27 10:18:41 +01:00
parent c5a7c9e70d
commit deb0a8677f
6 changed files with 38 additions and 10 deletions

View File

@@ -239,7 +239,8 @@ namespace Rendering {
SDL_Log("SDL3GPUShader: SDL_CreateGPUDevice failed: %s", SDL_GetError());
return false;
}
SDL_Log("SDL3GPUShader: driver = %s", SDL_GetGPUDeviceDriver(device_));
driver_name_ = SDL_GetGPUDeviceDriver(device_);
SDL_Log("SDL3GPUShader: driver = %s", driver_name_.c_str());
// ----------------------------------------------------------------
// 2. Claim window (una sola vez — no liberar hasta destroy())

View File

@@ -47,6 +47,7 @@ namespace Rendering {
void cleanup() final; // Libera pipeline/texturas pero mantiene el device vivo
void destroy(); // Limpieza completa (device + swapchain); llamar solo al cerrar
[[nodiscard]] auto isHardwareAccelerated() const -> bool override { return is_initialized_; }
[[nodiscard]] auto getDriverName() const -> std::string override { return driver_name_; }
// Sube píxeles ARGB8888 desde CPU; llamado antes de render()
void uploadPixels(const Uint32* pixels, int width, int height) override;
@@ -100,6 +101,7 @@ namespace Rendering {
int game_height_ = 0;
int ss_factor_ = 0; // Factor SS activo (3, 6, 9...) o 0 si SS desactivado
int oversample_ = 1; // SS on/off (1 = off, >1 = on)
std::string driver_name_;
bool is_initialized_ = false;
bool vsync_ = true;
bool integer_scale_ = false;