#include <pch.hpp>

#include <renderer/uniform_buffer.hpp>
#include <opengl/opengl_uniform_buffer.hpp>
#include <renderer/renderer.hpp>

namespace OpenEngine {

    Ref<UniformBuffer> UniformBuffer::Create(uint32_t size, uint32_t binding)
    {
        switch (Renderer::GetAPI())
        {
            case RendererAPI::API::None:    OE_CORE_ASSERT(false, "RendererAPI::None is currently not supported!"); return nullptr;
            case RendererAPI::API::OpenGL:  return CreateRef<OpenGLUniformBuffer>(size, binding);
        }

        OE_CORE_ASSERT(false, "Unknown RendererAPI!");
        return nullptr;
    }

}
