mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 02:49:55 +00:00
20 lines
508 B
C++
20 lines
508 B
C++
#include "engine.hpp"
|
|
|
|
#include "mwvr/openxrmanager.hpp"
|
|
#include "mwvr/vrsession.hpp"
|
|
#include "mwvr/vrviewer.hpp"
|
|
#include "mwvr/vrgui.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()");
|
|
|
|
mXrEnvironment.setManager(new MWVR::OpenXRManager);
|
|
mXrEnvironment.setSession(new MWVR::VRSession());
|
|
mXrEnvironment.setViewer(new MWVR::VRViewer(mViewer));
|
|
}
|