//
// Created by sebastian on 06.08.26.
//

#include "GuiRenderer.h"

void engine::renderer::GuiRenderer::render(const std::vector<GUITexture> &guiElements) const {
    m_shader->start();
    m_renderState.apply();

    m_fullscreenQuad->bind();
    for (auto& guiElement : guiElements) {
        m_shader->loadTransformationMatrix(guiElement.getTransform());
        guiElement.getTexture()->bind();
        m_fullscreenQuad->draw();
        guiElement.getTexture()->unbind();
    }
    m_fullscreenQuad->unbind();
}
