#pragma once

#include "buffer/FrameBuffer.hpp"
#include "interfaces/IRenderTarget.hpp"
#include "interfaces/ITexture.hpp"
#include "interfaces/IResizeNotifiable.hpp"
#include "interfaces/IRenderTexture.hpp"

namespace TSE::OpenGL
{
    class RenderTexture : public IRenderTexture
    {
    public:
        FrameBuffer buffer;

        RenderTexture(Vector2 v, uint textureCount = 1);

        Vector2 size() const override;
        void SetSize(Vector2 v) override;
        float Width() const override;
        float Height() const override;
        uint GetTextureId() const override;
        uint GetTextureId(uint id) const override;

        void Update() override;
        void Bind() override;
        void Unbind() override;

        void OnResize(float width, float height, IResizable* wnd) override;
    };
} // namespace TSE::OpenGL
