diff --git a/source/rendering/opengl/opengl_shader.cpp b/source/rendering/opengl/opengl_shader.cpp index 184e64e..3c296c2 100644 --- a/source/rendering/opengl/opengl_shader.cpp +++ b/source/rendering/opengl/opengl_shader.cpp @@ -232,6 +232,10 @@ 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_); + // Verificar que es OpenGL const char* renderer_name = SDL_GetRendererName(renderer_); if (!renderer_name || strncmp(renderer_name, "opengl", 6) != 0) { @@ -287,6 +291,9 @@ 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_); glUniform2f(texture_size_location_, texture_width_, texture_height_); checkGLError("glUniform2f(TextureSize)"); } else { diff --git a/source/screen.cpp b/source/screen.cpp index 1a5b89a..299274a 100644 --- a/source/screen.cpp +++ b/source/screen.cpp @@ -55,12 +55,8 @@ Screen::Screen() setDebugInfoEnabled(true); #endif - // Inicializa los shaders (solo en plataformas no-macOS por ahora) -#ifndef __APPLE__ - loadShaders(); - shader_backend_ = std::make_unique(); - shader_backend_->init(window_, game_canvas_, vertex_shader_source_, fragment_shader_source_); -#endif + // Inicializa los shaders si están activos en opciones + initShaders(); } // Destructor