/******************************************************************************
*	File		-	frame_buffer.h
*	Author		-	Joey Pollack
*	Date		-	2022/07/13 (y/m/d)
*	Mod Date	-	2022/07/13 (y/m/d)
*	Description	-	OpenGL Frame buffer object
******************************************************************************/

#ifndef LUNARIUM_FRAME_BUFFER_H_
#define LUNARIUM_FRAME_BUFFER_H_

#include <core/common_defs.h>

namespace lunarium
{
    class Texture;

    class FrameBuffer
    {
    public:
        static FrameBuffer* Create(int width, int height);
        static void Destroy(FrameBuffer** ppBuf);

        void Resize(int width, int height);
        void Bind();
        void Unbind();

        Texture* GetTexture();

    private:
        u32 mGLID;
        Texture* mTexture;
        u32 mRenderBufferID;

    private:
        FrameBuffer();
    };
}


#endif	// LUNARIUM_FRAME_BUFFER_H_