#pragma once
#include "DeerStudio/EditorEngine/API/GenericRefStructs.h"
#include <cstdint>
#include <string>

namespace Deer {
    namespace EditorEngine {
        struct FrameBufferStruct : FrameBufferHandleStruct{
            FrameBufferStruct(uint16_t _id) { frameBufferId = _id; }
            
            int getWidth();
            int getHeight();

            void clearRGBA(int, int, int, int);
            bool isValid();

            void resize(int, int);
            std::string getName();
        };

        FrameBufferStruct createRGBA8FrameBuffer(std::string& name, int, int);
        FrameBufferStruct getFrameBuffer(std::string& name);

        void frameBuffer_constructor(FrameBufferHandleStruct* mem);

        void registerFrameBufferStructs();
        void registerFrameBufferFunctions();
    }
}