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

#include "FrameBuffer.h"

#include <Platform/OpenGL/OpenGLFrameBuffer.h>

#include "Renderer.h"

namespace Hazel
{
    Ref<FrameBuffer> FrameBuffer::Create(const FrameBufferSpecification& spec)
    {
        switch (Renderer::GetAPI())
        {
            case RendererAPI::API::NONE:
                HZ_CORE_ERROR("NONE is not Support!");
                return nullptr;
            case RendererAPI::API::OPENGL:
                    return CreateRef<OpenGLFrameBuffer>(spec);
            default:
                break;
        }

        HZ_CORE_ERROR("Unknown RendererAPI!");
        return nullptr;
    }
}
