fix: alguns logs de consola
fix: alguns .h s'havien canviat a .hpp per error
This commit is contained in:
@@ -93,7 +93,7 @@ auto setParams(const std::string& var, const std::string& value) -> bool {
|
||||
{"game.play_area.rect.x", [](const std::string& v) { param.game.play_area.rect.x = std::stoi(v); }},
|
||||
{"game.play_area.rect.y", [](const std::string& v) { param.game.play_area.rect.y = std::stoi(v); }},
|
||||
{"game.play_area.rect.w", [](const std::string& v) { param.game.play_area.rect.w = std::stoi(v); }},
|
||||
{"game.play_area.rect.hpp", [](const std::string& v) { param.game.play_area.rect.h = std::stoi(v); }},
|
||||
{"game.play_area.rect.h", [](const std::string& v) { param.game.play_area.rect.h = std::stoi(v); }},
|
||||
{"game.name_entry_idle_time", [](const std::string& v) { param.game.name_entry_idle_time = std::stoi(v); }},
|
||||
{"game.name_entry_total_time", [](const std::string& v) { param.game.name_entry_total_time = std::stoi(v); }},
|
||||
{"game.hit_stop_ms", [](const std::string& v) { param.game.hit_stop_ms = std::stoi(v); }},
|
||||
@@ -105,7 +105,7 @@ auto setParams(const std::string& var, const std::string& value) -> bool {
|
||||
{"scoreboard.rect.x", [](const std::string& v) { param.scoreboard.rect.x = std::stoi(v); }},
|
||||
{"scoreboard.rect.y", [](const std::string& v) { param.scoreboard.rect.y = std::stoi(v); }},
|
||||
{"scoreboard.rect.w", [](const std::string& v) { param.scoreboard.rect.w = std::stoi(v); }},
|
||||
{"scoreboard.rect.hpp", [](const std::string& v) { param.scoreboard.rect.h = std::stoi(v); }},
|
||||
{"scoreboard.rect.h", [](const std::string& v) { param.scoreboard.rect.h = std::stoi(v); }},
|
||||
{"scoreboard.skip_countdown_value", [](const std::string& v) { param.scoreboard.skip_countdown_value = std::stoi(v); }},
|
||||
{"title.press_start_position", [](const std::string& v) { param.title.press_start_position = std::stoi(v); }},
|
||||
{"title.arcade_edition_position", [](const std::string& v) { param.title.arcade_edition_position = std::stoi(v); }},
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
#include "ui/logger.hpp" // Para Loger
|
||||
|
||||
namespace Rendering {
|
||||
|
||||
OpenGLShader::~OpenGLShader() {
|
||||
@@ -253,12 +255,24 @@ bool OpenGLShader::init(SDL_Window* window,
|
||||
SDL_GetWindowSize(window_, &window_width_, &window_height_);
|
||||
SDL_GetTextureSize(back_buffer_, &texture_width_, &texture_height_);
|
||||
|
||||
/*
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Inicializando shaders: ventana=%dx%d, textura=%.0fx%.0f",
|
||||
window_width_,
|
||||
window_height_,
|
||||
texture_width_,
|
||||
texture_height_);
|
||||
*/
|
||||
|
||||
Logger::info(
|
||||
"Inicializando shaders: ventana=" +
|
||||
std::to_string(window_width_) +
|
||||
"x" +
|
||||
std::to_string(window_height_) +
|
||||
", textura=" +
|
||||
std::to_string(static_cast<int>(texture_width_)) +
|
||||
"x" +
|
||||
std::to_string(static_cast<int>(texture_height_)));
|
||||
|
||||
// Verificar que es OpenGL
|
||||
const char* renderer_name = SDL_GetRendererName(renderer_);
|
||||
@@ -316,10 +330,17 @@ bool OpenGLShader::init(SDL_Window* window,
|
||||
glUseProgram(program_id_);
|
||||
texture_size_location_ = glGetUniformLocation(program_id_, "TextureSize");
|
||||
if (texture_size_location_ != -1) {
|
||||
/*
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Configurando TextureSize uniform: %.0fx%.0f",
|
||||
texture_width_,
|
||||
texture_height_);
|
||||
*/
|
||||
Logger::info(
|
||||
"Configurando TextureSize uniform: " +
|
||||
std::to_string(static_cast<int>(texture_width_)) +
|
||||
"x" +
|
||||
std::to_string(static_cast<int>(texture_height_)));
|
||||
glUniform2f(texture_size_location_, texture_width_, texture_height_);
|
||||
checkGLError("glUniform2f(TextureSize)");
|
||||
} else {
|
||||
@@ -329,9 +350,11 @@ bool OpenGLShader::init(SDL_Window* window,
|
||||
glUseProgram(0);
|
||||
|
||||
is_initialized_ = true;
|
||||
/*
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"** OpenGL 3.3 Shader Backend inicializado correctamente");
|
||||
|
||||
*/
|
||||
Logger::info("OpenGL 3.3 Shader Backend inicializado correctamente");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -238,11 +238,11 @@ void Screen::loadShaders() {
|
||||
// Si no existe versión ES, usar versión Desktop
|
||||
vertex_file = "crtpi_vertex.glsl";
|
||||
data = Asset::get()->loadData(vertex_file);
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Usando shaders OpenGL Desktop 3.3");
|
||||
// SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Usando shaders OpenGL Desktop 3.3");
|
||||
Logger::info("Usando shaders OpenGL Desktop 3.3");
|
||||
} else {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Usando shaders OpenGL ES 3.0 (Raspberry Pi)");
|
||||
// SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Usando shaders OpenGL ES 3.0 (Raspberry Pi)");
|
||||
Logger::info("Usando shaders OpenGL ES 3.0 (Raspberry Pi)");
|
||||
}
|
||||
|
||||
if (!data.empty()) {
|
||||
@@ -358,10 +358,12 @@ auto Screen::initSDLVideo() -> bool {
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Solicitando OpenGL 3.3 Core Profile");
|
||||
// SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Solicitando OpenGL 3.3 Core Profile");
|
||||
Logger::info("Solicitando OpenGL 3.3 Core Profile");
|
||||
#else
|
||||
// Linux: Dejar que SDL elija (Desktop 3.3 en PC, ES 3.0 en RPi automáticamente)
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Usando OpenGL por defecto del sistema");
|
||||
// SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Usando OpenGL por defecto del sistema");
|
||||
Logger::info("Usando OpenGL por defecto del sistema");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user