fix: alguns logs de consola
fix: alguns .h s'havien canviat a .hpp per error
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user