#include <pch.hpp>

#include <open_engine/renderer/texture.hpp>
#include <open_engine/renderer/renderer.hpp>
#include <open_engine/opengl/opengl_texture.hpp>

namespace OpenEngine {
    Ref<Texture2D> Texture2D::Create(const std::string &path)
    {
        switch (Renderer::GetApi()) {
            case RendererAPI::API::None : OE_CORE_ASSERT(false, "No render API selected!"); return nullptr;
            case RendererAPI::API::OpenGL : return std::make_shared<OpenGLTexture2D>(path);
        }

        OE_CORE_ASSERT(false, "Selected API not supported");
        return nullptr;
    }
}
