//
// Created by sfd on 25-4-21.
//

#include "VertexArray.h"

#include <Platform/OpenGL/OpenGLVertexArray.h>

#include "Renderer.h"

namespace Hazel
{
    VertexArray::~VertexArray()
    {
    }

    Ref<VertexArray> VertexArray::Create()
    {
        switch (Renderer::GetAPI())
        {
            case RendererAPI::API::NONE:
                HZ_CORE_ERROR("NONE is not Support!");
                return nullptr;
            case RendererAPI::API::OPENGL:
                    return CreateRef<OpenGLVertexArray>();
            default:
                break;
        }

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