light/modules/renderer/private/frontend/context/context.cpp
light7734 16f3a80fd3
Some checks reported errors
continuous-integration/drone/push Build was killed
feat(renderer): separate things into backend/frontend + major vk backend refactors
2025-10-04 22:08:19 +03:30

16 lines
430 B
C++

#include <renderer/api.hpp>
#include <renderer/backend/vk/context/context.hpp>
#include <renderer/frontend/context/context.hpp>
namespace lt::renderer {
auto IContext::create(API target_api, const ecs::Entity &surface_entity) -> Scope<IContext>
{
switch (target_api)
{
case API::Vulkan: return create_scope<vk::Context>(surface_entity);
default: throw std::runtime_error { "Invalid API" };
}
}
} // namespace lt::renderer