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

21 lines
545 B
C++

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