17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 21:29:19 +02:00
Files
maszyna/vr/vr_interface.cpp
maj00r ce5ee288ff fix the clang CI build
Every module unit now includes the standard headers it uses. Declarations
reaching a unit only through an imported module's global module fragment
are reachable but not visible, so ADL misses the free operators older
libstdc++ declares beside a type - reproduced on ubuntu 24.04 (libstdc++
13), where gl/vao.cpp could not compare vector iterators.

Also drops a stale editor/editorSettings.hpp from the MSVC source list,
which broke the Windows configure step, silences the deliberate
include-in-purview warning in the glm wrapper, and removes GCC support:
clang or MSVC only.
2026-09-09 22:52:28 +02:00

37 lines
821 B
C++

module;
#include <unordered_map>
#include <vector>
#include <memory>
#include <string>
module eu07.vr.vr_interface;
import eu07.utilities.logs;
vr_interface::~vr_interface() {}
bool vr_interface_factory::register_backend(const std::string &backend, vr_interface_factory::create_method func)
{
backends[backend] = func;
return true;
}
std::unique_ptr<vr_interface> vr_interface_factory::create(const std::string &backend)
{
auto it = backends.find(backend);
if (it != backends.end())
return it->second();
ErrorLog("vr backend \"" + backend + "\" not found!");
return nullptr;
}
vr_interface_factory *vr_interface_factory::get_instance()
{
if (!instance)
instance = new vr_interface_factory();
return instance;
}
vr_interface_factory *vr_interface_factory::instance;