]> git.tdb.fi Git - libs/vr.git/blobdiff - source/openvr/openvrsystem.h
Rename DisplayDevice to System
[libs/vr.git] / source / openvr / openvrsystem.h
diff --git a/source/openvr/openvrsystem.h b/source/openvr/openvrsystem.h
new file mode 100644 (file)
index 0000000..98ad556
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef MSP_VR_OPENVRSYSTEM_H_
+#define MSP_VR_OPENVRSYSTEM_H_
+
+#include <msp/gl/matrix.h>
+#include <msp/vr/system.h>
+#include "openvrcamera.h"
+#include "openvrcombiner.h"
+
+namespace Msp {
+namespace VR {
+
+class OpenVRSystem: public System
+{
+private:
+       GL::Matrix hmd_matrix;
+
+       static unsigned n_instances;
+
+public:
+       OpenVRSystem();
+       ~OpenVRSystem();
+
+       virtual void configure_window(Graphics::Window &) const { }
+       virtual void configure_view(StereoView &) const;
+       virtual OpenVRCamera *create_camera(const GL::Camera &);
+       virtual OpenVRCombiner *create_combiner(GL::View &);
+
+       void update_pose_matrices();
+       const GL::Matrix &get_hmd_matrix() const { return hmd_matrix; }
+};
+
+} // namespace VR
+} // namespace Msp
+
+#endif