]> git.tdb.fi Git - libs/vr.git/blob - source/openvr/openvrsystem.h
Add query functions for whether certain features are supported
[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 bool is_absolute_tracking_supported() const { return true; }
28         virtual void set_absolute_tracking(bool);
29         virtual bool get_absolute_tracking() const;
30         virtual OpenVRCamera *create_camera(const GL::Camera &);
31         virtual OpenVRCombiner *create_combiner(GL::View &);
32
33         void update_pose_matrices();
34         const GL::Matrix &get_hmd_matrix() const { return hmd_matrix; }
35 };
36
37 } // namespace VR
38 } // namespace Msp
39
40 #endif