#include "DeerRender/FrameBuffer.h"

namespace Deer {
    Scope<FrameBuffer> ResourceBuilder<FrameBuffer>::buildResource(const FrameBufferData& baseData) {
        TextureBufferType tbt;
        switch (baseData.frameBufferType)
        {
        case FrameBufferData::FrameBufferType::RGBA8 :
            tbt = TextureBufferType::RGBA8;
            break;
        
        default:
            break;
        }

        FrameBufferSpecification spec(baseData.sizeX, baseData.sizeY, {tbt}, baseData.samples);
        

        Scope<FrameBuffer> frameBuffer = Scope<FrameBuffer>(FrameBuffer::create(spec));
        return frameBuffer;

    }
}