1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 15:19:55 +00:00
openmw-tes3mp/apps/openmw/vrengine.cpp

23 lines
609 B
C++
Raw Normal View History

#include "engine.hpp"
#include "mwvr/openxrmanager.hpp"
#include "mwvr/vrsession.hpp"
#include "mwvr/vrviewer.hpp"
#include "mwvr/vrgui.hpp"
2021-05-20 20:40:48 +00:00
#include "mwvr/vrtracking.hpp"
#ifndef USE_OPENXR
#error "USE_OPENXR not defined"
#endif
void OMW::Engine::initVr()
{
if (!mViewer)
throw std::logic_error("mViewer must be initialized before calling initVr()");
2020-02-29 22:53:56 +00:00
mXrEnvironment.setManager(new MWVR::OpenXRManager);
mXrEnvironment.setSession(new MWVR::VRSession());
mXrEnvironment.setViewer(new MWVR::VRViewer(mViewer));
2021-05-20 20:40:48 +00:00
mXrEnvironment.setTrackingManager(new MWVR::VRTrackingManager());
}