3#include <Covellite/Api/Window.hpp>
4#include <alicorn/std/string.hpp>
5#include <alicorn/patterns/factory.hpp>
6#include "Renderer/IGraphicApi.hpp"
14 auto Window::GetRenderers(
void) -> ::std::vector<String_t>
25 auto Window::MakeImpl(
const String_t & _Api,
26 const renderer::SettingsData & _Data) -> IGraphicApiPtr_t
28 using namespace ::alicorn::modules::patterns;
30 if (_Api != uT(
"Auto"))
32 return factory::make_unique<renderer::IGraphicApi>(_Api, _Data);
35 for (
const auto & Name : GetRenderers())
39 return factory::make_unique<renderer::IGraphicApi>(Name, _Data);
41 catch (const ::std::exception & _Ex)
46 LOGGER(Warning) << uT(
"Create graphics API ") << Name <<
" error: "
51 throw STD_EXCEPTION <<
"Unknown Api: " << _Api;