// Copyright (c) 2012-2017 VideoStitch SAS // Copyright (c) 2018 stitchEm #pragma once #include #include "lambdathread.hpp" #include "oculusrenderer.hpp" #include "mirrorwidget.hpp" #include "texture.hpp" #include #include class VS_COMMON_EXPORT OculusWindow : public QWindow { public: explicit OculusWindow(bool stereoscopic, bool mirror = true); virtual ~OculusWindow(); bool start(); // Should only be called from the primary thread virtual void stop(); OculusRenderer& getRenderer(); private: void renderLoop(); void displayMirrorWindow(); protected: bool shuttingDown; LambdaThread renderThread; std::unique_ptr context; std::unique_ptr mirrorWidget; OculusRenderer* oculus; bool started; bool mirror; };