]> git.tdb.fi Git - libs/vr.git/blob - source/libovr/libovrsystem.h
a7978e47ff7128f1d9cc0bed8a39f7f29638fa98
[libs/vr.git] / source / libovr / libovrsystem.h
1 #ifndef MSP_VR_LIBOVRSYSTEM_H_
2 #define MSP_VR_LIBOVRSYSTEM_H_
3
4 #include <msp/vr/system.h>
5 #include "libovrcamera.h"
6 #include "libovrcombiner.h"
7
8 namespace Msp {
9 namespace VR {
10
11 class LibOVRSystem: public System
12 {
13 public:
14         struct Private;
15
16 private:
17         Private *priv;
18         unsigned frame_index;
19         bool timing_active;
20
21         static unsigned n_instances;
22
23 public:
24         LibOVRSystem();
25         virtual ~LibOVRSystem();
26
27         const Private &get_private() const { return *priv; }
28
29         virtual void configure_window(Graphics::Window &) const;
30         virtual void configure_view(StereoView &) const;
31         virtual void set_absolute_tracking(bool);
32         virtual LibOVRCamera *create_camera(const GL::Camera &);
33         virtual LibOVRCombiner *create_combiner(GL::View &);
34
35         void begin_frame();
36         void end_frame();
37         bool is_timing_active() const { return timing_active; }
38         double get_tracking_time() const;
39         double get_timewarp_time() const;
40         double get_current_time() const;
41 };
42
43 } // namespace VR
44 } // namespace Msp
45
46 #endif