light/modules/renderer/private/frontend/context/gpu.cpp
light7734 61473c2758
Some checks failed
continuous-integration/drone/push Build is failing
test(renderer): overhaul tests & fix many bugs
2025-10-07 16:09:50 +03:30

18 lines
455 B
C++

#include <renderer/backend/vk/context/gpu.hpp>
#include <renderer/frontend/context/gpu.hpp>
namespace lt::renderer {
[[nodiscard]] /* static */ auto IGpu::create(Api target_api, IInstance *instance)
-> memory::Scope<IGpu>
{
switch (target_api)
{
case Api::vulkan: return memory::create_scope<vk::Gpu>(instance);
case Api::none:
case Api::metal:
case Api::direct_x: throw std::runtime_error { "Invalid API" };
}
}
} // namespace lt::renderer