]> git.tdb.fi Git - libs/vr.git/blob - source/openvr/openvrsystem.h
498865992fdaa8c5a886e3f3e2bb8bdb1d3f128d
[libs/vr.git] / source / openvr / openvrsystem.h
1 #ifndef MSP_VR_OPENVRSYSTEM_H_
2 #define MSP_VR_OPENVRSYSTEM_H_
3
4 #include <msp/gl/matrix.h>
5 #include <msp/vr/system.h>
6 #include "openvrcamera.h"
7 #include "openvrcombiner.h"
8
9 namespace Msp {
10 namespace VR {
11
12 class OpenVRSystem: public System
13 {
14 private:
15         GL::Matrix hmd_matrix;
16
17         static unsigned n_instances;
18
19 public:
20         OpenVRSystem();
21         ~OpenVRSystem();
22
23         static bool is_maybe_available();
24
25         virtual void configure_window(Graphics::Window &) const { }
26         virtual void configure_view(StereoView &) const;
27         virtual void set_absolute_tracking(bool);
28         virtual OpenVRCamera *create_camera(const GL::Camera &);
29         virtual OpenVRCombiner *create_combiner(GL::View &);
30
31         void update_pose_matrices();
32         const GL::Matrix &get_hmd_matrix() const { return hmd_matrix; }
33 };
34
35 } // namespace VR
36 } // namespace Msp
37
38 #endif