//
// Created by sfd on 25-6-8.
//

#include "UniformBuffer.h"

#include <Platform/OpenGL/OpenGLUniformBuffer.h>

#include "Renderer.h"

namespace Hazel
{
    Ref<UniformBuffer> UniformBuffer::Create(uint32_t size, uint32_t binding)
    {
        switch (Renderer::GetAPI())
        {
        case RendererAPI::API::NONE:
            HZ_CORE_ERROR("NONE is not Support!");
            return nullptr;
        case RendererAPI::API::OPENGL:
            return CreateRef<OpenGLUniformBuffer>(size, binding);
        default:
            break;
        }

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