light/modules/renderer/private/frontend/context/swapchain.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

23 lines
538 B
C++

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