//
// Created by sfd on 25-5-25.
//

#ifndef OPENGLFRAMEBUFFER_H
#define OPENGLFRAMEBUFFER_H
#include <Hazel/Renderer/FrameBuffer.h>


namespace Hazel
{
    class OpenGLFrameBuffer : public FrameBuffer
    {
    public:
        OpenGLFrameBuffer(const FrameBufferSpecification& spec);
        virtual ~OpenGLFrameBuffer();

        void Bind() override;
        void UnBind() override;

        virtual const FrameBufferSpecification& GetSpecification() const override { return m_Specification; }
        virtual uint32_t GetColorAttachmentID() const override { return m_ColorAttachment; }
        virtual void Resize(uint32_t width, uint32_t height) override;

        void Invalidata();

    private:
        uint32_t m_RendererID = 0;
        uint32_t m_ColorAttachment = 0, m_DepthAttachment = 0;
        FrameBufferSpecification m_Specification;
    };
}

#endif //OPENGLFRAMEBUFFER_H
