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

#ifndef COLORRACE_GUITEXTURE_H
#define COLORRACE_GUITEXTURE_H
#include <memory>

#include "glm/fwd.hpp"
#include "glm/vec2.hpp"
#include "loader/textures/Texture2D.h"

namespace engine {
    class GUITexture {
    public:
        GUITexture(std::shared_ptr<Texture2D> texture, glm::vec2 position, glm::vec2 size) : position(position), size(size), texture(std::move(texture)) {}
        [[nodiscard]] const glm::vec2& getPosition() const { return position; }
        [[nodiscard]] const glm::vec2& getSize() const { return size; }
        [[nodiscard]] const std::shared_ptr<Texture2D>& getTexture() const { return texture; }

        void bind();
        void unbind();

        glm::mat4 getTransform() const;
    private:
        const glm::vec2 position;
        const glm::vec2 size;

        std::shared_ptr<Texture2D> texture;
    };
} // engine

#endif //COLORRACE_GUITEXTURE_H
